https://bugs.webkit.org/show_bug.cgi?id=131299
Reviewed by Darin Adler.
EFL and GTK ports have managed own client of NavigatorContentUtils though it is only passed to
NavigatorContentUtils. The NavigatorContentUtils has used the client to call port functions. So,
there is no reason port implementation needs to manage the ownership. To manage the client is
unnecessary work in current implementation.
Source/WebCore:
No new tests, no behavior changes.
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::NavigatorContentUtils::create):
(WebCore::provideNavigatorContentUtilsTo):
* Modules/navigatorcontentutils/NavigatorContentUtils.h:
* Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
Source/WebKit/efl:
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
Source/WebKit/gtk:
* webkit/webkitwebview.cpp:
(webkit_web_view_init):
* webkit/webkitwebviewprivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166915
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-04-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Change NavigatorContentUtils client ownership from port side to NavigatorContentUtils
+ https://bugs.webkit.org/show_bug.cgi?id=131299
+
+ Reviewed by Darin Adler.
+
+ EFL and GTK ports have managed own client of NavigatorContentUtils though it is only passed to
+ NavigatorContentUtils. The NavigatorContentUtils has used the client to call port functions. So,
+ there is no reason port implementation needs to manage the ownership. To manage the client is
+ unnecessary work in current implementation.
+
+ No new tests, no behavior changes.
+
+ * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
+ (WebCore::NavigatorContentUtils::create):
+ (WebCore::provideNavigatorContentUtilsTo):
+ * Modules/navigatorcontentutils/NavigatorContentUtils.h:
+ * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
+
2014-04-07 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Simplify the parsing of width arguments for Inset shapes
{
}
-PassRef<NavigatorContentUtils> NavigatorContentUtils::create(NavigatorContentUtilsClient* client)
+PassRef<NavigatorContentUtils> NavigatorContentUtils::create(std::unique_ptr<NavigatorContentUtilsClient> client)
{
- return adoptRef(*new NavigatorContentUtils(client));
+ return adoptRef(*new NavigatorContentUtils(std::move(client)));
}
void NavigatorContentUtils::registerProtocolHandler(Navigator* navigator, const String& scheme, const String& url, const String& title, ExceptionCode& ec)
return "NavigatorContentUtils";
}
-void provideNavigatorContentUtilsTo(Page* page, NavigatorContentUtilsClient* client)
+void provideNavigatorContentUtilsTo(Page* page, std::unique_ptr<NavigatorContentUtilsClient> client)
{
- RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, NavigatorContentUtils::supplementName(), NavigatorContentUtils::create(client));
+ RefCountedSupplement<Page, NavigatorContentUtils>::provideTo(page, NavigatorContentUtils::supplementName(), NavigatorContentUtils::create(std::move(client)));
}
} // namespace WebCore
static void unregisterProtocolHandler(Navigator*, const String& scheme, const String& url, ExceptionCode&);
#endif
- static PassRef<NavigatorContentUtils> create(NavigatorContentUtilsClient*);
+ static PassRef<NavigatorContentUtils> create(std::unique_ptr<NavigatorContentUtilsClient>);
private:
- explicit NavigatorContentUtils(NavigatorContentUtilsClient* client)
- : m_client(client)
+ explicit NavigatorContentUtils(std::unique_ptr<NavigatorContentUtilsClient> client)
+ : m_client(std::move(client))
{ }
- NavigatorContentUtilsClient* client() { return m_client; }
+ NavigatorContentUtilsClient* client() { return m_client.get(); }
- NavigatorContentUtilsClient* m_client;
+ std::unique_ptr<NavigatorContentUtilsClient> m_client;
};
} // namespace WebCore
#endif
};
-void provideNavigatorContentUtilsTo(Page*, NavigatorContentUtilsClient*);
+void provideNavigatorContentUtilsTo(Page*, std::unique_ptr<NavigatorContentUtilsClient>);
}
+2014-04-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Change NavigatorContentUtils client ownership from port side to NavigatorContentUtils
+ https://bugs.webkit.org/show_bug.cgi?id=131299
+
+ Reviewed by Darin Adler.
+
+ EFL and GTK ports have managed own client of NavigatorContentUtils though it is only passed to
+ NavigatorContentUtils. The NavigatorContentUtils has used the client to call port functions. So,
+ there is no reason port implementation needs to manage the ownership. To manage the client is
+ unnecessary work in current implementation.
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+
2014-04-07 Hyowon Kim <hw1008.kim@samsung.com>
Move to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platform/graphics.
#if ENABLE(INPUT_TYPE_COLOR)
WebCore::ColorChooserClient* colorChooserClient;
#endif
-#if ENABLE(NAVIGATOR_CONTENT_UTILS) || ENABLE(CUSTOM_SCHEME_HANDLER)
- std::unique_ptr<WebCore::NavigatorContentUtilsClientEfl> navigatorContentUtilsClient;
-#endif
struct {
Ewk_Menu menu;
WebCore::PopupMenuClient* menuClient;
#endif
#if ENABLE(NAVIGATOR_CONTENT_UTILS)
- priv->navigatorContentUtilsClient = std::make_unique<WebCore::NavigatorContentUtilsClientEfl>(smartData->self);
- WebCore::provideNavigatorContentUtilsTo(priv->page.get(), priv->navigatorContentUtilsClient.get());
+ WebCore::provideNavigatorContentUtilsTo(priv->page.get(), std::make_unique<WebCore::NavigatorContentUtilsClientEfl>(smartData->self));
#endif
#if ENABLE(GEOLOCATION)
+2014-04-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Change NavigatorContentUtils client ownership from port side to NavigatorContentUtils
+ https://bugs.webkit.org/show_bug.cgi?id=131299
+
+ Reviewed by Darin Adler.
+
+ EFL and GTK ports have managed own client of NavigatorContentUtils though it is only passed to
+ NavigatorContentUtils. The NavigatorContentUtils has used the client to call port functions. So,
+ there is no reason port implementation needs to manage the ownership. To manage the client is
+ unnecessary work in current implementation.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_init):
+ * webkit/webkitwebviewprivate.h:
+
2014-04-07 Hyowon Kim <hw1008.kim@samsung.com>
Move to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platform/graphics.
#endif
#if ENABLE(NAVIGATOR_CONTENT_UTILS)
- priv->navigatorContentUtilsClient = std::make_unique<WebKit::NavigatorContentUtilsClient>();
- WebCore::provideNavigatorContentUtilsTo(priv->corePage, priv->navigatorContentUtilsClient.get());
+ WebCore::provideNavigatorContentUtilsTo(priv->corePage, std::make_unique<WebKit::NavigatorContentUtilsClient>());
#endif
#if ENABLE(BATTERY_STATUS)
#if ENABLE(GEOLOCATION)
std::unique_ptr<WebCore::GeolocationClientMock> geolocationClientMock;
#endif
-
-#if ENABLE(NAVIGATOR_CONTENT_UTILS)
- std::unique_ptr<WebKit::NavigatorContentUtilsClient> navigatorContentUtilsClient;
-#endif
};
void webkit_web_view_notify_ready(WebKitWebView*);