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

Side by Side 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: Restructure tests again 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
6 #define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
7
8 #include "base/macros.h"
9 #include "chrome/browser/guest_view/guest_view.h"
10 #include "extensions/browser/extension_function_dispatcher.h"
11 #include "url/gurl.h"
12
13 namespace content {
14 class BrowserContext;
15 }
16
17 class ExtensionOptionsGuest
18 : public GuestView<ExtensionOptionsGuest>,
19 public extensions::ExtensionFunctionDispatcher::Delegate {
20 public:
21 static const char Type[];
22
23 ExtensionOptionsGuest(content::BrowserContext* browser_context,
24 int guest_instance_id);
25
26 // GuestViewBase implementation.
27 virtual bool CanEmbedderUseGuestView(
28 const std::string& embedder_extension_id) OVERRIDE;
29 virtual void CreateWebContents(
30 const std::string& embedder_extension_id,
31 int embedder_render_process_id,
32 const base::DictionaryValue& create_params,
33 const WebContentsCreatedCallback& callback) OVERRIDE;
34 virtual void DidAttachToEmbedder() OVERRIDE;
35 virtual void DidInitialize() OVERRIDE;
36
37 // ExtensionFunctionDispatcher::Delegate implementation.
38 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
39
40 // content::WebContentsObserver implementation.
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
42
43 private:
44 virtual ~ExtensionOptionsGuest();
45 void OnRequest(const ExtensionHostMsg_Request_Params& params);
46
47 scoped_ptr<extensions::ExtensionFunctionDispatcher>
48 extension_function_dispatcher_;
49 GURL options_page_;
50
51 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest);
52 };
53
54 #endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698