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

Side by Side Diff: chrome/browser/guest_view/extension_options/extension_options_guest.h

Issue 426593007: Refactor guest view availability to be API not permission based. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MostLikelyContextType Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
6 #define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/guest_view/guest_view.h" 9 #include "chrome/browser/guest_view/guest_view.h"
10 #include "extensions/browser/extension_function_dispatcher.h" 10 #include "extensions/browser/extension_function_dispatcher.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 namespace content { 13 namespace content {
14 class BrowserContext; 14 class BrowserContext;
15 } 15 }
16 16
17 class ExtensionOptionsGuest 17 class ExtensionOptionsGuest
18 : public GuestView<ExtensionOptionsGuest>, 18 : public GuestView<ExtensionOptionsGuest>,
19 public extensions::ExtensionFunctionDispatcher::Delegate { 19 public extensions::ExtensionFunctionDispatcher::Delegate {
20 public: 20 public:
21 static const char Type[]; 21 static const char Type[];
22 static GuestViewBase* Create(content::BrowserContext* browser_context, 22 static GuestViewBase* Create(content::BrowserContext* browser_context,
23 int guest_instance_id); 23 int guest_instance_id);
24 24
25 // GuestViewBase implementation. 25 // GuestViewBase implementation.
26 virtual bool CanEmbedderUseGuestView( 26 virtual const char* GetAPINamespace() OVERRIDE;
27 const std::string& embedder_extension_id) OVERRIDE;
28 virtual void CreateWebContents( 27 virtual void CreateWebContents(
29 const std::string& embedder_extension_id, 28 const std::string& embedder_extension_id,
30 int embedder_render_process_id, 29 int embedder_render_process_id,
31 const base::DictionaryValue& create_params, 30 const base::DictionaryValue& create_params,
32 const WebContentsCreatedCallback& callback) OVERRIDE; 31 const WebContentsCreatedCallback& callback) OVERRIDE;
33 virtual void DidAttachToEmbedder() OVERRIDE; 32 virtual void DidAttachToEmbedder() OVERRIDE;
34 virtual void DidInitialize() OVERRIDE; 33 virtual void DidInitialize() OVERRIDE;
35 virtual void DidStopLoading() OVERRIDE; 34 virtual void DidStopLoading() OVERRIDE;
36 virtual void GuestSizeChangedDueToAutoSize( 35 virtual void GuestSizeChangedDueToAutoSize(
37 const gfx::Size& old_size, 36 const gfx::Size& old_size,
(...skipping 14 matching lines...) Expand all
52 void OnRequest(const ExtensionHostMsg_Request_Params& params); 51 void OnRequest(const ExtensionHostMsg_Request_Params& params);
53 52
54 scoped_ptr<extensions::ExtensionFunctionDispatcher> 53 scoped_ptr<extensions::ExtensionFunctionDispatcher>
55 extension_function_dispatcher_; 54 extension_function_dispatcher_;
56 GURL options_page_; 55 GURL options_page_;
57 56
58 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest); 57 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest);
59 }; 58 };
60 59
61 #endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H _ 60 #endif // CHROME_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698