From 5a5eae380a94b625cdae866726ca5e448c19aa29 Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Thu, 1 Aug 2013 10:02:15 +0300 Subject: [PATCH] Changed the way we propagate the TooltipText to the browser control(s) to use a method instead of a property (which works better with WPF) + dropped it from BrowserCore. I suspect BrowserCore might be dropped in its entirety in the future; it adds a little bit of value but works poorly with "the WPF way". --- CefSharp/BrowserCore.h | 16 ---------------- CefSharp/Internals/ClientAdapter.cpp | 2 +- CefSharp/Internals/IWebBrowserInternal.h | 3 +-- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/CefSharp/BrowserCore.h b/CefSharp/BrowserCore.h index 526c2e6f4..1c9ac2742 100644 --- a/CefSharp/BrowserCore.h +++ b/CefSharp/BrowserCore.h @@ -90,8 +90,6 @@ namespace CefSharp _address = address; PropertyChanged(this, gcnew PropertyChangedEventArgs(L"Address")); - - TooltipText = nullptr; } } @@ -109,20 +107,6 @@ namespace CefSharp } } - property String^ TooltipText - { - String^ get() { return _tooltip; } - - void set(String^ text) - { - if (_tooltip != text) - { - _tooltip = text; - PropertyChanged(this, gcnew PropertyChangedEventArgs(L"TooltipText")); - } - } - } - virtual property ILifeSpanHandler^ LifeSpanHandler { ILifeSpanHandler^ get() { return _lifeSpanHandler; } diff --git a/CefSharp/Internals/ClientAdapter.cpp b/CefSharp/Internals/ClientAdapter.cpp index dc535e4bb..f58304987 100644 --- a/CefSharp/Internals/ClientAdapter.cpp +++ b/CefSharp/Internals/ClientAdapter.cpp @@ -86,7 +86,7 @@ namespace CefSharp if (tooltip != _tooltip) { _tooltip = tooltip; - _browserControl->TooltipText = _tooltip; + _browserControl->SetTooltipText(_tooltip); } return true; diff --git a/CefSharp/Internals/IWebBrowserInternal.h b/CefSharp/Internals/IWebBrowserInternal.h index e37bda8c8..44c8c6cfd 100644 --- a/CefSharp/Internals/IWebBrowserInternal.h +++ b/CefSharp/Internals/IWebBrowserInternal.h @@ -23,8 +23,6 @@ namespace CefSharp property bool IsBrowserInitialized { bool get(); } property bool IsLoading { bool get(); } - property String^ TooltipText; - property ILifeSpanHandler^ LifeSpanHandler; property ILoadHandler^ LoadHandler; property IRequestHandler^ RequestHandler; @@ -36,6 +34,7 @@ namespace CefSharp void SetAddress(String^ address); void SetTitle(String^ title); + void SetTooltipText(String^ tooltipText); void LoadHtml(String^ html); void Stop(); void Reload();