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

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

Issue 1392343002: Reduce the public method footprint of GuestViewBase and derived types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Reverted reordering in cc files. Created 5 years, 2 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
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 EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUEST_ H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/guest_view/browser/guest_view.h" 9 #include "components/guest_view/browser/guest_view.h"
10 #include "extensions/browser/guest_view/extension_options/extension_options_gues t_delegate.h" 10 #include "extensions/browser/guest_view/extension_options/extension_options_gues t_delegate.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 namespace extensions { 17 namespace extensions {
18 18
19 class ExtensionOptionsGuest 19 class ExtensionOptionsGuest
20 : public guest_view::GuestView<ExtensionOptionsGuest> { 20 : public guest_view::GuestView<ExtensionOptionsGuest> {
21 public: 21 public:
22 static const char Type[]; 22 static const char Type[];
23 static guest_view::GuestViewBase* Create( 23 static guest_view::GuestViewBase* Create(
24 content::WebContents* owner_web_contents); 24 content::WebContents* owner_web_contents);
25 25
26 private:
27 explicit ExtensionOptionsGuest(content::WebContents* owner_web_contents);
28 ~ExtensionOptionsGuest() override;
29
26 // GuestViewBase implementation. 30 // GuestViewBase implementation.
27 bool CanRunInDetachedState() const override; 31 bool CanRunInDetachedState() const final;
28 void CreateWebContents(const base::DictionaryValue& create_params, 32 void CreateWebContents(const base::DictionaryValue& create_params,
29 const WebContentsCreatedCallback& callback) override; 33 const WebContentsCreatedCallback& callback) final;
30 void DidInitialize(const base::DictionaryValue& create_params) override; 34 void DidInitialize(const base::DictionaryValue& create_params) final;
31 void GuestViewDidStopLoading() override; 35 void GuestViewDidStopLoading() final;
32 const char* GetAPINamespace() const override; 36 const char* GetAPINamespace() const final;
33 int GetTaskPrefix() const override; 37 int GetTaskPrefix() const final;
34 bool IsPreferredSizeModeEnabled() const override; 38 bool IsPreferredSizeModeEnabled() const final;
35 void OnPreferredSizeChanged(const gfx::Size& pref_size) override; 39 void OnPreferredSizeChanged(const gfx::Size& pref_size) final;
36 bool ShouldHandleFindRequestsForEmbedder() const override; 40 bool ShouldHandleFindRequestsForEmbedder() const final;
37 41
38 // content::WebContentsDelegate implementation. 42 // content::WebContentsDelegate implementation.
39 content::WebContents* OpenURLFromTab( 43 content::WebContents* OpenURLFromTab(
40 content::WebContents* source, 44 content::WebContents* source,
41 const content::OpenURLParams& params) override; 45 const content::OpenURLParams& params) final;
42 void CloseContents(content::WebContents* source) override; 46 void CloseContents(content::WebContents* source) final;
43 bool HandleContextMenu(const content::ContextMenuParams& params) override; 47 bool HandleContextMenu(const content::ContextMenuParams& params) final;
44 bool ShouldCreateWebContents( 48 bool ShouldCreateWebContents(
45 content::WebContents* web_contents, 49 content::WebContents* web_contents,
46 int route_id, 50 int route_id,
47 int main_frame_route_id, 51 int main_frame_route_id,
48 WindowContainerType window_container_type, 52 WindowContainerType window_container_type,
49 const std::string& frame_name, 53 const std::string& frame_name,
50 const GURL& target_url, 54 const GURL& target_url,
51 const std::string& partition_id, 55 const std::string& partition_id,
52 content::SessionStorageNamespace* session_storage_namespace) override; 56 content::SessionStorageNamespace* session_storage_namespace) final;
53 57
54 // content::WebContentsObserver implementation. 58 // content::WebContentsObserver implementation.
55 void DidNavigateMainFrame( 59 void DidNavigateMainFrame(const content::LoadCommittedDetails& details,
56 const content::LoadCommittedDetails& details, 60 const content::FrameNavigateParams& params) final;
57 const content::FrameNavigateParams& params) override;
58
59 private:
60 explicit ExtensionOptionsGuest(content::WebContents* owner_web_contents);
61 ~ExtensionOptionsGuest() override;
62 61
63 scoped_ptr<extensions::ExtensionOptionsGuestDelegate> 62 scoped_ptr<extensions::ExtensionOptionsGuestDelegate>
64 extension_options_guest_delegate_; 63 extension_options_guest_delegate_;
65 GURL options_page_; 64 GURL options_page_;
66 65
67 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest); 66 DISALLOW_COPY_AND_ASSIGN(ExtensionOptionsGuest);
68 }; 67 };
69 68
70 } // namespace extensions 69 } // namespace extensions
71 70
72 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUE ST_H_ 71 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_OPTIONS_EXTENSION_OPTIONS_GUE ST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698