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

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

Issue 2411293002: Fix cross-renderer resource loads for <webview> with PlzNavigate. (Closed)
Patch Set: fix Created 4 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_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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 const std::string& frame_name, 248 const std::string& frame_name,
249 const GURL& target_url, 249 const GURL& target_url,
250 content::WebContents* new_contents) final; 250 content::WebContents* new_contents) final;
251 void EnterFullscreenModeForTab(content::WebContents* web_contents, 251 void EnterFullscreenModeForTab(content::WebContents* web_contents,
252 const GURL& origin) final; 252 const GURL& origin) final;
253 void ExitFullscreenModeForTab(content::WebContents* web_contents) final; 253 void ExitFullscreenModeForTab(content::WebContents* web_contents) final;
254 bool IsFullscreenForTabOrPending( 254 bool IsFullscreenForTabOrPending(
255 const content::WebContents* web_contents) const final; 255 const content::WebContents* web_contents) const final;
256 256
257 // WebContentsObserver implementation. 257 // WebContentsObserver implementation.
258 void DidCommitProvisionalLoadForFrame( 258 void DidStartNavigation(content::NavigationHandle* navigation_handle) final;
259 content::RenderFrameHost* render_frame_host, 259 void DidFinishNavigation(content::NavigationHandle* navigation_handle) final;
260 const GURL& url,
261 ui::PageTransition transition_type) final;
262 void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host,
263 const GURL& validated_url,
264 int error_code,
265 const base::string16& error_description,
266 bool was_ignored_by_handler) final;
267 void DidStartProvisionalLoadForFrame(
268 content::RenderFrameHost* render_frame_host,
269 const GURL& validated_url,
270 bool is_error_page,
271 bool is_iframe_srcdoc) final;
272 void RenderProcessGone(base::TerminationStatus status) final; 260 void RenderProcessGone(base::TerminationStatus status) final;
273 void UserAgentOverrideSet(const std::string& user_agent) final; 261 void UserAgentOverrideSet(const std::string& user_agent) final;
274 void FrameNameChanged(content::RenderFrameHost* render_frame_host, 262 void FrameNameChanged(content::RenderFrameHost* render_frame_host,
275 const std::string& name) final; 263 const std::string& name) final;
276 264
277 // Informs the embedder of a frame name change. 265 // Informs the embedder of a frame name change.
278 void ReportFrameNameChange(const std::string& name); 266 void ReportFrameNameChange(const std::string& name);
279 267
280 // Called after the load handler is called in the guest's main frame. 268 // Called after the load handler is called in the guest's main frame.
281 void LoadHandlerCalled(); 269 void LoadHandlerCalled();
(...skipping 19 matching lines...) Expand all
301 WindowOpenDisposition disposition, 289 WindowOpenDisposition disposition,
302 const gfx::Rect& initial_bounds, 290 const gfx::Rect& initial_bounds,
303 bool user_gesture, 291 bool user_gesture,
304 content::WebContents* new_contents); 292 content::WebContents* new_contents);
305 293
306 // Requests resolution of a potentially relative URL. 294 // Requests resolution of a potentially relative URL.
307 GURL ResolveURL(const std::string& src); 295 GURL ResolveURL(const std::string& src);
308 296
309 // Notification that a load in the guest resulted in abort. Note that |url| 297 // Notification that a load in the guest resulted in abort. Note that |url|
310 // may be invalid. 298 // may be invalid.
311 void LoadAbort(bool is_top_level, 299 void LoadAbort(bool is_top_level, const GURL& url, int error_code);
312 const GURL& url,
313 int error_code,
314 const std::string& error_type);
315 300
316 // Creates a new guest window owned by this WebViewGuest. 301 // Creates a new guest window owned by this WebViewGuest.
317 void CreateNewGuestWebViewWindow(const content::OpenURLParams& params); 302 void CreateNewGuestWebViewWindow(const content::OpenURLParams& params);
318 303
319 void NewGuestWebViewCallback(const content::OpenURLParams& params, 304 void NewGuestWebViewCallback(const content::OpenURLParams& params,
320 content::WebContents* guest_web_contents); 305 content::WebContents* guest_web_contents);
321 306
322 bool HandleKeyboardShortcuts(const content::NativeWebKeyboardEvent& event); 307 bool HandleKeyboardShortcuts(const content::NativeWebKeyboardEvent& event);
323 308
324 void ApplyAttributes(const base::DictionaryValue& params); 309 void ApplyAttributes(const base::DictionaryValue& params);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // This is used to ensure pending tasks will not fire after this object is 370 // This is used to ensure pending tasks will not fire after this object is
386 // destroyed. 371 // destroyed.
387 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 372 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
388 373
389 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 374 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
390 }; 375 };
391 376
392 } // namespace extensions 377 } // namespace extensions
393 378
394 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 379 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698