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

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

Issue 972313002: Make <webview> use out-of-process iframe architecture. (Closed) Base URL: ssh://saopaulo.wat/mnt/dev/shared/src@testoopif2z-better-chrome
Patch Set: Rebase after swapped out changes major rework with RFP Created 5 years, 6 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"
11 #include "components/guest_view/browser/guest_view.h" 11 #include "components/guest_view/browser/guest_view.h"
12 #include "content/public/browser/javascript_dialog_manager.h" 12 #include "content/public/browser/javascript_dialog_manager.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "extensions/browser/guest_view/web_view/javascript_dialog_helper.h" 15 #include "extensions/browser/guest_view/web_view/javascript_dialog_helper.h"
16 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h" 16 #include "extensions/browser/guest_view/web_view/web_view_find_helper.h"
17 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" 17 #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h"
18 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" 18 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h"
19 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" 19 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h"
20 #include "extensions/browser/script_executor.h" 20 #include "extensions/browser/script_executor.h"
21 21
22 namespace blink { 22 namespace blink {
23 struct WebFindOptions; 23 struct WebFindOptions;
24 } // nanespace blink 24 } // nanespace blink
25 25
26 namespace content {
27 struct GlobalRequestID;
28 } // namespace content
29
26 namespace extensions { 30 namespace extensions {
27 31
28 class WebViewInternalFindFunction; 32 class WebViewInternalFindFunction;
29 33
30 // A WebViewGuest provides the browser-side implementation of the <webview> API 34 // A WebViewGuest provides the browser-side implementation of the <webview> API
31 // and manages the dispatch of <webview> extension events. WebViewGuest is 35 // and manages the dispatch of <webview> extension events. WebViewGuest is
32 // created on attachment. That is, when a guest WebContents is associated with 36 // created on attachment. That is, when a guest WebContents is associated with
33 // a particular embedder WebContents. This happens on either initial navigation 37 // a particular embedder WebContents. This happens on either initial navigation
34 // or through the use of the New Window API, when a new window is attached to 38 // or through the use of the New Window API, when a new window is attached to
35 // a particular <webview>. 39 // a particular <webview>.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 void LoadRedirect(const GURL& old_url, 313 void LoadRedirect(const GURL& old_url,
310 const GURL& new_url, 314 const GURL& new_url,
311 bool is_top_level); 315 bool is_top_level);
312 316
313 void PushWebViewStateToIOThread(); 317 void PushWebViewStateToIOThread();
314 static void RemoveWebViewStateFromIOThread( 318 static void RemoveWebViewStateFromIOThread(
315 content::WebContents* web_contents); 319 content::WebContents* web_contents);
316 320
317 // Loads the |url| provided. |force_navigation| indicates whether to reload 321 // Loads the |url| provided. |force_navigation| indicates whether to reload
318 // the content if the provided |url| matches the current page of the guest. 322 // the content if the provided |url| matches the current page of the guest.
319 void LoadURLWithParams(const GURL& url, 323 // TODO(lazyboy): Use OpenURLParams as parameter.?
Fady Samuel 2015/06/11 22:27:21 The WebViewGuest changes seem like something you c
320 const content::Referrer& referrer, 324 void LoadURLWithParams(
321 ui::PageTransition transition_type, 325 const GURL& url,
322 bool force_navigation); 326 const content::Referrer& referrer,
327 ui::PageTransition transition_type,
328 const content::GlobalRequestID& transferred_global_request_id,
329 bool force_navigation);
323 330
324 void RequestNewWindowPermission( 331 void RequestNewWindowPermission(
325 WindowOpenDisposition disposition, 332 WindowOpenDisposition disposition,
326 const gfx::Rect& initial_bounds, 333 const gfx::Rect& initial_bounds,
327 bool user_gesture, 334 bool user_gesture,
328 content::WebContents* new_contents); 335 content::WebContents* new_contents);
329 336
330 // Requests resolution of a potentially relative URL. 337 // Requests resolution of a potentially relative URL.
331 GURL ResolveURL(const std::string& src); 338 GURL ResolveURL(const std::string& src);
332 339
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // This is used to ensure pending tasks will not fire after this object is 413 // This is used to ensure pending tasks will not fire after this object is
407 // destroyed. 414 // destroyed.
408 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; 415 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
409 416
410 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 417 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
411 }; 418 };
412 419
413 } // namespace extensions 420 } // namespace extensions
414 421
415 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 422 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698