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

Unified Diff: chrome/browser/guest_view/extension_options/extension_options_guest.h

Issue 378783002: Initial implementation of the <extensionoptions> GuestView tag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix problems with attaching guest view, add extension function dispatcher Created 6 years, 5 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: chrome/browser/guest_view/extension_options/extension_options_guest.h
diff --git a/chrome/browser/guest_view/extension_options/extension_options_guest.h b/chrome/browser/guest_view/extension_options/extension_options_guest.h
new file mode 100644
index 0000000000000000000000000000000000000000..7cfb888a2144ea97eda41d259abb7ac415701fc5
--- /dev/null
+++ b/chrome/browser/guest_view/extension_options/extension_options_guest.h
@@ -0,0 +1,45 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
+#define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
+
+#include "chrome/browser/guest_view/guest_view.h"
+#include "extensions/browser/extension_function_dispatcher.h"
+
+class ExtensionOptionsGuest :
+ public GuestView<ExtensionOptionsGuest>,
+ public extensions::ExtensionFunctionDispatcher::Delegate {
+
+ public:
+ static const char Type[];
+
+ ExtensionOptionsGuest(content::BrowserContext* browser_context,
+ int guest_instance_id);
+
+ // GuestViewBase implementation
+ virtual void DidAttachToEmbedder() OVERRIDE;
+ virtual void DidInitialize() OVERRIDE;
+ virtual void CreateWebContents(
+ const std::string& embedder_extension_id,
+ int embedder_render_process_id,
+ const base::DictionaryValue& create_params,
+ const WebContentsCreatedCallback& callback) OVERRIDE;
+
+ // ExtensionFunctionDispatcher::Delegate implementation
+ virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
+
+ // content::WebContentsObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ private:
+ virtual ~ExtensionOptionsGuest();
+ void OnRequest(const ExtensionHostMsg_Request_Params& params);
+
+ scoped_ptr<extensions::ExtensionFunctionDispatcher>
+ extension_function_dispatcher_;
+ GURL options_page_;
+};
+
+#endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_

Powered by Google App Engine
This is Rietveld 408576698