OLD | NEW |
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 APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_ | 5 #ifndef APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_ |
6 #define APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_ | 6 #define APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/public/browser/web_contents_delegate.h" | 9 #include "content/public/browser/web_contents_delegate.h" |
10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 virtual ~CustomLauncherPageContents(); | 37 virtual ~CustomLauncherPageContents(); |
38 | 38 |
39 // Called to initialize and load the WebContents. | 39 // Called to initialize and load the WebContents. |
40 void Initialize(content::BrowserContext* context, const GURL& url); | 40 void Initialize(content::BrowserContext* context, const GURL& url); |
41 | 41 |
42 content::WebContents* web_contents() const { return web_contents_.get(); } | 42 content::WebContents* web_contents() const { return web_contents_.get(); } |
43 | 43 |
44 // content::WebContentsDelegate overrides: | 44 // content::WebContentsDelegate overrides: |
45 virtual content::WebContents* OpenURLFromTab( | 45 virtual content::WebContents* OpenURLFromTab( |
46 content::WebContents* source, | 46 content::WebContents* source, |
47 const content::OpenURLParams& params) OVERRIDE; | 47 const content::OpenURLParams& params) override; |
48 virtual void AddNewContents(content::WebContents* source, | 48 virtual void AddNewContents(content::WebContents* source, |
49 content::WebContents* new_contents, | 49 content::WebContents* new_contents, |
50 WindowOpenDisposition disposition, | 50 WindowOpenDisposition disposition, |
51 const gfx::Rect& initial_pos, | 51 const gfx::Rect& initial_pos, |
52 bool user_gesture, | 52 bool user_gesture, |
53 bool* was_blocked) OVERRIDE; | 53 bool* was_blocked) override; |
54 virtual bool IsPopupOrPanel( | 54 virtual bool IsPopupOrPanel( |
55 const content::WebContents* source) const OVERRIDE; | 55 const content::WebContents* source) const override; |
56 virtual bool ShouldSuppressDialogs() OVERRIDE; | 56 virtual bool ShouldSuppressDialogs() override; |
57 virtual bool PreHandleGestureEvent( | 57 virtual bool PreHandleGestureEvent( |
58 content::WebContents* source, | 58 content::WebContents* source, |
59 const blink::WebGestureEvent& event) OVERRIDE; | 59 const blink::WebGestureEvent& event) override; |
60 virtual content::ColorChooser* OpenColorChooser( | 60 virtual content::ColorChooser* OpenColorChooser( |
61 content::WebContents* web_contents, | 61 content::WebContents* web_contents, |
62 SkColor color, | 62 SkColor color, |
63 const std::vector<content::ColorSuggestion>& suggestions) OVERRIDE; | 63 const std::vector<content::ColorSuggestion>& suggestions) override; |
64 virtual void RunFileChooser( | 64 virtual void RunFileChooser( |
65 content::WebContents* tab, | 65 content::WebContents* tab, |
66 const content::FileChooserParams& params) OVERRIDE; | 66 const content::FileChooserParams& params) override; |
67 virtual void RequestToLockMouse(content::WebContents* web_contents, | 67 virtual void RequestToLockMouse(content::WebContents* web_contents, |
68 bool user_gesture, | 68 bool user_gesture, |
69 bool last_unlocked_by_target) OVERRIDE; | 69 bool last_unlocked_by_target) override; |
70 virtual void RequestMediaAccessPermission( | 70 virtual void RequestMediaAccessPermission( |
71 content::WebContents* web_contents, | 71 content::WebContents* web_contents, |
72 const content::MediaStreamRequest& request, | 72 const content::MediaStreamRequest& request, |
73 const content::MediaResponseCallback& callback) OVERRIDE; | 73 const content::MediaResponseCallback& callback) override; |
74 virtual bool CheckMediaAccessPermission( | 74 virtual bool CheckMediaAccessPermission( |
75 content::WebContents* web_contents, | 75 content::WebContents* web_contents, |
76 const GURL& security_origin, | 76 const GURL& security_origin, |
77 content::MediaStreamType type) OVERRIDE; | 77 content::MediaStreamType type) override; |
78 | 78 |
79 private: | 79 private: |
80 // content::WebContentsObserver overrides: | 80 // content::WebContentsObserver overrides: |
81 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 81 virtual bool OnMessageReceived(const IPC::Message& message) override; |
82 | 82 |
83 // extensions::ExtensionFunctionDispatcher::Delegate overrides: | 83 // extensions::ExtensionFunctionDispatcher::Delegate overrides: |
84 virtual extensions::WindowController* GetExtensionWindowController() | 84 virtual extensions::WindowController* GetExtensionWindowController() |
85 const OVERRIDE; | 85 const override; |
86 virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE; | 86 virtual content::WebContents* GetAssociatedWebContents() const override; |
87 | 87 |
88 void OnRequest(const ExtensionHostMsg_Request_Params& params); | 88 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
89 | 89 |
90 scoped_ptr<content::WebContents> web_contents_; | 90 scoped_ptr<content::WebContents> web_contents_; |
91 scoped_ptr<extensions::ExtensionFunctionDispatcher> | 91 scoped_ptr<extensions::ExtensionFunctionDispatcher> |
92 extension_function_dispatcher_; | 92 extension_function_dispatcher_; |
93 scoped_ptr<extensions::AppDelegate> app_delegate_; | 93 scoped_ptr<extensions::AppDelegate> app_delegate_; |
94 scoped_ptr<extensions::AppWebContentsHelper> helper_; | 94 scoped_ptr<extensions::AppWebContentsHelper> helper_; |
95 | 95 |
96 std::string extension_id_; | 96 std::string extension_id_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(CustomLauncherPageContents); | 98 DISALLOW_COPY_AND_ASSIGN(CustomLauncherPageContents); |
99 }; | 99 }; |
100 | 100 |
101 } // namespace apps | 101 } // namespace apps |
102 | 102 |
103 #endif // APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_ | 103 #endif // APPS_CUSTOM_LAUNCHER_PAGE_CONTENTS_H_ |
OLD | NEW |