Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h

Issue 2627413003: NavigatorContentUtils should be a supplement of Navigator (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h
index 4ee3a807fa9bf6fcca136bedb9111791111d77b6..5298a38f8850a55147df3b89ed614b53f8cd3406 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h
@@ -27,7 +27,7 @@
#ifndef NavigatorContentUtils_h
#define NavigatorContentUtils_h
-#include "core/frame/LocalFrame.h"
+#include "core/frame/Navigator.h"
#include "modules/ModulesExport.h"
#include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h"
#include "platform/Supplementable.h"
@@ -37,18 +37,17 @@
namespace blink {
class ExceptionState;
-class LocalFrame;
class Navigator;
class MODULES_EXPORT NavigatorContentUtils final
: public GarbageCollectedFinalized<NavigatorContentUtils>,
- public Supplement<LocalFrame> {
+ public Supplement<Navigator> {
USING_GARBAGE_COLLECTED_MIXIN(NavigatorContentUtils);
public:
virtual ~NavigatorContentUtils();
- static NavigatorContentUtils* from(LocalFrame&);
+ static NavigatorContentUtils* from(Navigator&);
static const char* supplementName();
static void registerProtocolHandler(Navigator&,
@@ -65,7 +64,7 @@ class MODULES_EXPORT NavigatorContentUtils final
const String& url,
ExceptionState&);
- static NavigatorContentUtils* create(NavigatorContentUtilsClient*);
+ static void provideTo(Navigator&, NavigatorContentUtilsClient*);
DECLARE_VIRTUAL_TRACE();
@@ -74,8 +73,9 @@ class MODULES_EXPORT NavigatorContentUtils final
}
private:
- explicit NavigatorContentUtils(NavigatorContentUtilsClient* client)
- : m_client(client) {}
+ NavigatorContentUtils(Navigator& navigator,
+ NavigatorContentUtilsClient* client)
+ : Supplement<Navigator>(navigator), m_client(client) {}
NavigatorContentUtilsClient* client() { return m_client.get(); }

Powered by Google App Engine
This is Rietveld 408576698