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

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

Issue 334923002: Remove ContentBrowserClient::GuestWebContentsAttached (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_adview
Patch Set: Hopefully fixed tests Created 6 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 CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 6 #define CHROME_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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // |items| == NULL means no filtering will be applied. 81 // |items| == NULL means no filtering will be applied.
82 void ShowContextMenu(int request_id, const MenuItemVector* items); 82 void ShowContextMenu(int request_id, const MenuItemVector* items);
83 83
84 // Sets the frame name of the guest. 84 // Sets the frame name of the guest.
85 void SetName(const std::string& name); 85 void SetName(const std::string& name);
86 86
87 // Set the zoom factor. 87 // Set the zoom factor.
88 void SetZoom(double zoom_factor); 88 void SetZoom(double zoom_factor);
89 89
90 // GuestViewBase implementation. 90 // GuestViewBase implementation.
91 virtual void Attach(content::WebContents* embedder_web_contents, 91 virtual void DidAttachToEmbedder() OVERRIDE;
92 const base::DictionaryValue& args) OVERRIDE;
93 virtual void DidStopLoading() OVERRIDE; 92 virtual void DidStopLoading() OVERRIDE;
94 virtual void EmbedderDestroyed() OVERRIDE; 93 virtual void EmbedderDestroyed() OVERRIDE;
95 virtual void GuestDestroyed() OVERRIDE; 94 virtual void GuestDestroyed() OVERRIDE;
96 virtual bool IsDragAndDropEnabled() const OVERRIDE; 95 virtual bool IsDragAndDropEnabled() const OVERRIDE;
96 virtual void WillAttachToEmbedder() OVERRIDE;
97 virtual void WillDestroy() OVERRIDE; 97 virtual void WillDestroy() OVERRIDE;
98 98
99 // WebContentsDelegate implementation. 99 // WebContentsDelegate implementation.
100 virtual bool AddMessageToConsole(content::WebContents* source, 100 virtual bool AddMessageToConsole(content::WebContents* source,
101 int32 level, 101 int32 level,
102 const base::string16& message, 102 const base::string16& message,
103 int32 line_no, 103 int32 line_no,
104 const base::string16& source_id) OVERRIDE; 104 const base::string16& source_id) OVERRIDE;
105 virtual void LoadProgressChanged(content::WebContents* source, 105 virtual void LoadProgressChanged(content::WebContents* source,
106 double progress) OVERRIDE; 106 double progress) OVERRIDE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 virtual content::WebContents* OpenURLFromTab( 144 virtual content::WebContents* OpenURLFromTab(
145 content::WebContents* source, 145 content::WebContents* source,
146 const content::OpenURLParams& params) OVERRIDE; 146 const content::OpenURLParams& params) OVERRIDE;
147 virtual void WebContentsCreated(content::WebContents* source_contents, 147 virtual void WebContentsCreated(content::WebContents* source_contents,
148 int opener_render_frame_id, 148 int opener_render_frame_id,
149 const base::string16& frame_name, 149 const base::string16& frame_name,
150 const GURL& target_url, 150 const GURL& target_url,
151 content::WebContents* new_contents) OVERRIDE; 151 content::WebContents* new_contents) OVERRIDE;
152 152
153 // BrowserPluginGuestDelegate implementation. 153 // BrowserPluginGuestDelegate implementation.
154 virtual void DidAttach(const base::DictionaryValue& extra_params) OVERRIDE;
155 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size) 154 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
156 OVERRIDE; 155 OVERRIDE;
157 virtual void RequestPointerLockPermission( 156 virtual void RequestPointerLockPermission(
158 bool user_gesture, 157 bool user_gesture,
159 bool last_unlocked_by_target, 158 bool last_unlocked_by_target,
160 const base::Callback<void(bool)>& callback) OVERRIDE; 159 const base::Callback<void(bool)>& callback) OVERRIDE;
161
162 // NotificationObserver implementation. 160 // NotificationObserver implementation.
163 virtual void Observe(int type, 161 virtual void Observe(int type,
164 const content::NotificationSource& source, 162 const content::NotificationSource& source,
165 const content::NotificationDetails& details) OVERRIDE; 163 const content::NotificationDetails& details) OVERRIDE;
166 164
167 // Returns the current zoom factor. 165 // Returns the current zoom factor.
168 double GetZoom(); 166 double GetZoom();
169 167
170 // Begin or continue a find request. 168 // Begin or continue a find request.
171 void Find(const base::string16& search_text, 169 void Find(const base::string16& search_text,
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // A counter to generate a unique request id for a permission request. 446 // A counter to generate a unique request id for a permission request.
449 // We only need the ids to be unique for a given WebViewGuest. 447 // We only need the ids to be unique for a given WebViewGuest.
450 int next_permission_request_id_; 448 int next_permission_request_id_;
451 449
452 typedef std::map<int, PermissionResponseInfo> RequestMap; 450 typedef std::map<int, PermissionResponseInfo> RequestMap;
453 RequestMap pending_permission_requests_; 451 RequestMap pending_permission_requests_;
454 452
455 // True if the user agent is overridden. 453 // True if the user agent is overridden.
456 bool is_overriding_user_agent_; 454 bool is_overriding_user_agent_;
457 455
458 // Indicates that the page needs to be reloaded once it has been attached to
459 // an embedder.
460 bool pending_reload_on_attachment_;
461
462 // Main frame ID of last committed page. 456 // Main frame ID of last committed page.
463 int64 main_frame_id_; 457 int64 main_frame_id_;
464 458
465 // Set to |true| if ChromeVox was already injected in main frame. 459 // Set to |true| if ChromeVox was already injected in main frame.
466 bool chromevox_injected_; 460 bool chromevox_injected_;
467 461
468 // Stores the current zoom factor. 462 // Stores the current zoom factor.
469 double current_zoom_factor_; 463 double current_zoom_factor_;
470 464
471 // Stores the window name of the main frame of the guest. 465 // Stores the window name of the main frame of the guest.
(...skipping 18 matching lines...) Expand all
490 accessibility_subscription_; 484 accessibility_subscription_;
491 #endif 485 #endif
492 486
493 std::map<int, int> bridge_id_to_request_id_map_; 487 std::map<int, int> bridge_id_to_request_id_map_;
494 488
495 // Tracks the name, and target URL of the new window. Once the first 489 // Tracks the name, and target URL of the new window. Once the first
496 // navigation commits, we no longer track this information. 490 // navigation commits, we no longer track this information.
497 struct NewWindowInfo { 491 struct NewWindowInfo {
498 GURL url; 492 GURL url;
499 std::string name; 493 std::string name;
494 bool changed;
500 NewWindowInfo(const GURL& url, const std::string& name) : 495 NewWindowInfo(const GURL& url, const std::string& name) :
501 url(url), 496 url(url),
502 name(name) {} 497 name(name),
498 changed(false) {}
503 }; 499 };
504 500
505 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; 501 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap;
506 PendingWindowMap pending_new_windows_; 502 PendingWindowMap pending_new_windows_;
507 503
508 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 504 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
509 }; 505 };
510 506
511 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 507 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/guest_view_manager_unittest.cc ('k') | chrome/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698