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

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: SurfaceView fix 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Sets the transparency of the guest. 84 // Sets the transparency of the guest.
85 void SetAllowTransparency(bool allow); 85 void SetAllowTransparency(bool allow);
86 86
87 // Loads a data URL with a specified base URL and virtual URL. 87 // Loads a data URL with a specified base URL and virtual URL.
88 bool LoadDataWithBaseURL(const std::string& data_url, 88 bool LoadDataWithBaseURL(const std::string& data_url,
89 const std::string& base_url, 89 const std::string& base_url,
90 const std::string& virtual_url, 90 const std::string& virtual_url,
91 std::string* error); 91 std::string* error);
92 92
93 // GuestViewBase implementation. 93 // GuestViewBase implementation.
94 const char* GetAPINamespace() const override; 94 bool CanRunInDetachedState() const override;
95 int GetTaskPrefix() const override;
96 void CreateWebContents(const base::DictionaryValue& create_params, 95 void CreateWebContents(const base::DictionaryValue& create_params,
97 const WebContentsCreatedCallback& callback) override; 96 const WebContentsCreatedCallback& callback) override;
98 void DidAttachToEmbedder() override; 97 void DidAttachToEmbedder() override;
99 void DidInitialize(const base::DictionaryValue& create_params) override; 98 void DidInitialize(const base::DictionaryValue& create_params) override;
100 void DidStopLoading() override; 99 void DidStopLoading() override;
101 void EmbedderWillBeDestroyed() override; 100 void EmbedderWillBeDestroyed() override;
101 const char* GetAPINamespace() const override;
102 int GetTaskPrefix() const override;
102 void GuestDestroyed() override; 103 void GuestDestroyed() override;
103 void GuestReady() override; 104 void GuestReady() override;
104 void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size, 105 void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size,
105 const gfx::Size& new_size) override; 106 const gfx::Size& new_size) override;
106 bool IsAutoSizeSupported() const override; 107 bool IsAutoSizeSupported() const override;
107 bool IsDragAndDropEnabled() const override; 108 bool IsDragAndDropEnabled() const override;
108 void WillAttachToEmbedder() override; 109 void WillAttachToEmbedder() override;
109 void WillDestroy() override; 110 void WillDestroy() override;
110 111
111 // WebContentsDelegate implementation. 112 // WebContentsDelegate implementation.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 content::WebContents* OpenURLFromTab( 156 content::WebContents* OpenURLFromTab(
156 content::WebContents* source, 157 content::WebContents* source,
157 const content::OpenURLParams& params) override; 158 const content::OpenURLParams& params) override;
158 void WebContentsCreated(content::WebContents* source_contents, 159 void WebContentsCreated(content::WebContents* source_contents,
159 int opener_render_frame_id, 160 int opener_render_frame_id,
160 const base::string16& frame_name, 161 const base::string16& frame_name,
161 const GURL& target_url, 162 const GURL& target_url,
162 content::WebContents* new_contents) override; 163 content::WebContents* new_contents) override;
163 164
164 // BrowserPluginGuestDelegate implementation. 165 // BrowserPluginGuestDelegate implementation.
165 bool CanRunInDetachedState() const override;
166 content::WebContents* CreateNewGuestWindow( 166 content::WebContents* CreateNewGuestWindow(
167 const content::WebContents::CreateParams& create_params) override; 167 const content::WebContents::CreateParams& create_params) override;
168 void RequestPointerLockPermission( 168 void RequestPointerLockPermission(
169 bool user_gesture, 169 bool user_gesture,
170 bool last_unlocked_by_target, 170 bool last_unlocked_by_target,
171 const base::Callback<void(bool)>& callback) override; 171 const base::Callback<void(bool)>& callback) override;
172
172 // NotificationObserver implementation. 173 // NotificationObserver implementation.
173 void Observe(int type, 174 void Observe(int type,
174 const content::NotificationSource& source, 175 const content::NotificationSource& source,
175 const content::NotificationDetails& details) override; 176 const content::NotificationDetails& details) override;
176 177
177 // Returns the current zoom factor. 178 // Returns the current zoom factor.
178 double zoom() const { return current_zoom_factor_; } 179 double zoom() const { return current_zoom_factor_; }
179 180
180 // Begin or continue a find request. 181 // Begin or continue a find request.
181 void StartFinding(const base::string16& search_text, 182 void StartFinding(const base::string16& search_text,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 // This is used to ensure pending tasks will not fire after this object is 376 // This is used to ensure pending tasks will not fire after this object is
376 // destroyed. 377 // destroyed.
377 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 378 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
378 379
379 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 380 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
380 }; 381 };
381 382
382 } // namespace extensions 383 } // namespace extensions
383 384
384 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 385 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698