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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.h

Issue 845363004: <webview>, <appview> and <extensionoptions> can run in a detached state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 11 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_WEB_VIEW_WEB_VIEW_GUEST_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Sets the transparency of the guest. 83 // Sets the transparency of the guest.
84 void SetAllowTransparency(bool allow); 84 void SetAllowTransparency(bool allow);
85 85
86 // Loads a data URL with a specified base URL and virtual URL. 86 // Loads a data URL with a specified base URL and virtual URL.
87 bool LoadDataWithBaseURL(const std::string& data_url, 87 bool LoadDataWithBaseURL(const std::string& data_url,
88 const std::string& base_url, 88 const std::string& base_url,
89 const std::string& virtual_url, 89 const std::string& virtual_url,
90 std::string* error); 90 std::string* error);
91 91
92 // GuestViewBase implementation. 92 // GuestViewBase implementation.
93 const char* GetAPINamespace() const override; 93 bool CanRunInDetachedState() const override;
94 int GetTaskPrefix() const override;
95 void CreateWebContents(const base::DictionaryValue& create_params, 94 void CreateWebContents(const base::DictionaryValue& create_params,
96 const WebContentsCreatedCallback& callback) override; 95 const WebContentsCreatedCallback& callback) override;
97 void DidAttachToEmbedder() override; 96 void DidAttachToEmbedder() override;
98 void DidInitialize(const base::DictionaryValue& create_params) override; 97 void DidInitialize(const base::DictionaryValue& create_params) override;
99 void DidStopLoading() override; 98 void DidStopLoading() override;
100 void EmbedderWillBeDestroyed() override; 99 void EmbedderWillBeDestroyed() override;
100 const char* GetAPINamespace() const override;
101 int GetTaskPrefix() const override;
101 void GuestDestroyed() override; 102 void GuestDestroyed() override;
102 void GuestReady() override; 103 void GuestReady() override;
103 void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size, 104 void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size,
104 const gfx::Size& new_size) override; 105 const gfx::Size& new_size) override;
105 bool IsAutoSizeSupported() const override; 106 bool IsAutoSizeSupported() const override;
106 bool IsDragAndDropEnabled() const override; 107 bool IsDragAndDropEnabled() const override;
107 void WillAttachToEmbedder() override; 108 void WillAttachToEmbedder() override;
108 void WillDestroy() override; 109 void WillDestroy() override;
109 110
110 // WebContentsDelegate implementation. 111 // WebContentsDelegate implementation.
(...skipping 14 matching lines...) Expand all
125 bool HandleContextMenu(const content::ContextMenuParams& params) override; 126 bool HandleContextMenu(const content::ContextMenuParams& params) override;
126 void HandleKeyboardEvent( 127 void HandleKeyboardEvent(
127 content::WebContents* source, 128 content::WebContents* source,
128 const content::NativeWebKeyboardEvent& event) override; 129 const content::NativeWebKeyboardEvent& event) override;
129 void RendererResponsive(content::WebContents* source) override; 130 void RendererResponsive(content::WebContents* source) override;
130 void RendererUnresponsive(content::WebContents* source) override; 131 void RendererUnresponsive(content::WebContents* source) override;
131 void RequestMediaAccessPermission( 132 void RequestMediaAccessPermission(
132 content::WebContents* source, 133 content::WebContents* source,
133 const content::MediaStreamRequest& request, 134 const content::MediaStreamRequest& request,
134 const content::MediaResponseCallback& callback) override; 135 const content::MediaResponseCallback& callback) override;
136 void RequestPointerLockPermission(
137 bool user_gesture,
138 bool last_unlocked_by_target,
139 const base::Callback<void(bool)>& callback) override;
135 bool CheckMediaAccessPermission(content::WebContents* source, 140 bool CheckMediaAccessPermission(content::WebContents* source,
136 const GURL& security_origin, 141 const GURL& security_origin,
137 content::MediaStreamType type) override; 142 content::MediaStreamType type) override;
138 void CanDownload(content::RenderViewHost* render_view_host, 143 void CanDownload(content::RenderViewHost* render_view_host,
139 const GURL& url, 144 const GURL& url,
140 const std::string& request_method, 145 const std::string& request_method,
141 const base::Callback<void(bool)>& callback) override; 146 const base::Callback<void(bool)>& callback) override;
142 content::JavaScriptDialogManager* GetJavaScriptDialogManager( 147 content::JavaScriptDialogManager* GetJavaScriptDialogManager(
143 content::WebContents* source) override; 148 content::WebContents* source) override;
144 content::ColorChooser* OpenColorChooser( 149 content::ColorChooser* OpenColorChooser(
145 content::WebContents* web_contents, 150 content::WebContents* web_contents,
146 SkColor color, 151 SkColor color,
147 const std::vector<content::ColorSuggestion>& suggestions) override; 152 const std::vector<content::ColorSuggestion>& suggestions) override;
148 void AddNewContents(content::WebContents* source, 153 void AddNewContents(content::WebContents* source,
149 content::WebContents* new_contents, 154 content::WebContents* new_contents,
150 WindowOpenDisposition disposition, 155 WindowOpenDisposition disposition,
151 const gfx::Rect& initial_pos, 156 const gfx::Rect& initial_pos,
152 bool user_gesture, 157 bool user_gesture,
153 bool* was_blocked) override; 158 bool* was_blocked) override;
154 content::WebContents* OpenURLFromTab( 159 content::WebContents* OpenURLFromTab(
155 content::WebContents* source, 160 content::WebContents* source,
156 const content::OpenURLParams& params) override; 161 const content::OpenURLParams& params) override;
157 void WebContentsCreated(content::WebContents* source_contents, 162 void WebContentsCreated(content::WebContents* source_contents,
158 int opener_render_frame_id, 163 int opener_render_frame_id,
159 const base::string16& frame_name, 164 const base::string16& frame_name,
160 const GURL& target_url, 165 const GURL& target_url,
161 content::WebContents* new_contents) override; 166 content::WebContents* new_contents) override;
162 167
163 // BrowserPluginGuestDelegate implementation.
164 bool CanRunInDetachedState() const override;
165 void RequestPointerLockPermission(
166 bool user_gesture,
167 bool last_unlocked_by_target,
168 const base::Callback<void(bool)>& callback) override;
169 // NotificationObserver implementation. 168 // NotificationObserver implementation.
170 void Observe(int type, 169 void Observe(int type,
171 const content::NotificationSource& source, 170 const content::NotificationSource& source,
172 const content::NotificationDetails& details) override; 171 const content::NotificationDetails& details) override;
173 172
174 // Returns the current zoom factor. 173 // Returns the current zoom factor.
175 double zoom() const { return current_zoom_factor_; } 174 double zoom() const { return current_zoom_factor_; }
176 175
177 // Begin or continue a find request. 176 // Begin or continue a find request.
178 void StartFinding(const base::string16& search_text, 177 void StartFinding(const base::string16& search_text,
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 // This is used to ensure pending tasks will not fire after this object is 369 // This is used to ensure pending tasks will not fire after this object is
371 // destroyed. 370 // destroyed.
372 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 371 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
373 372
374 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 373 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
375 }; 374 };
376 375
377 } // namespace extensions 376 } // namespace extensions
378 377
379 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 378 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698