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

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

Issue 318433002: Prevent derived classes of GuestViewBase from overriding key methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void SetName(const std::string& name); 64 void SetName(const std::string& name);
65 65
66 // Set the zoom factor. 66 // Set the zoom factor.
67 void SetZoom(double zoom_factor); 67 void SetZoom(double zoom_factor);
68 68
69 // GuestViewBase implementation. 69 // GuestViewBase implementation.
70 virtual void Attach(content::WebContents* embedder_web_contents, 70 virtual void Attach(content::WebContents* embedder_web_contents,
71 const base::DictionaryValue& args) OVERRIDE; 71 const base::DictionaryValue& args) OVERRIDE;
72 virtual void DidStopLoading() OVERRIDE; 72 virtual void DidStopLoading() OVERRIDE;
73 virtual void EmbedderDestroyed() OVERRIDE; 73 virtual void EmbedderDestroyed() OVERRIDE;
74 virtual void GuestDestroyed() OVERRIDE;
74 virtual bool IsDragAndDropEnabled() const OVERRIDE; 75 virtual bool IsDragAndDropEnabled() const OVERRIDE;
76 virtual void WillDestroy() OVERRIDE;
75 77
76 // WebContentsDelegate implementation. 78 // WebContentsDelegate implementation.
77 virtual bool AddMessageToConsole(content::WebContents* source, 79 virtual bool AddMessageToConsole(content::WebContents* source,
78 int32 level, 80 int32 level,
79 const base::string16& message, 81 const base::string16& message,
80 int32 line_no, 82 int32 line_no,
81 const base::string16& source_id) OVERRIDE; 83 const base::string16& source_id) OVERRIDE;
82 virtual void LoadProgressChanged(content::WebContents* source, 84 virtual void LoadProgressChanged(content::WebContents* source,
83 double progress) OVERRIDE; 85 double progress) OVERRIDE;
84 virtual void CloseContents(content::WebContents* source) OVERRIDE; 86 virtual void CloseContents(content::WebContents* source) OVERRIDE;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 131
130 // BrowserPluginGuestDelegate implementation. 132 // BrowserPluginGuestDelegate implementation.
131 virtual void DidAttach() OVERRIDE; 133 virtual void DidAttach() OVERRIDE;
132 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size) 134 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
133 OVERRIDE; 135 OVERRIDE;
134 virtual void RequestPointerLockPermission( 136 virtual void RequestPointerLockPermission(
135 bool user_gesture, 137 bool user_gesture,
136 bool last_unlocked_by_target, 138 bool last_unlocked_by_target,
137 const base::Callback<void(bool)>& callback) OVERRIDE; 139 const base::Callback<void(bool)>& callback) OVERRIDE;
138 virtual void NavigateGuest(const std::string& src) OVERRIDE; 140 virtual void NavigateGuest(const std::string& src) OVERRIDE;
139 virtual void Destroy() OVERRIDE;
140 141
141 // NotificationObserver implementation. 142 // NotificationObserver implementation.
142 virtual void Observe(int type, 143 virtual void Observe(int type,
143 const content::NotificationSource& source, 144 const content::NotificationSource& source,
144 const content::NotificationDetails& details) OVERRIDE; 145 const content::NotificationDetails& details) OVERRIDE;
145 146
146 // Returns the current zoom factor. 147 // Returns the current zoom factor.
147 double GetZoom(); 148 double GetZoom();
148 149
149 // Begin or continue a find request. 150 // Begin or continue a find request.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 bool is_error_page, 293 bool is_error_page,
293 bool is_iframe_srcdoc, 294 bool is_iframe_srcdoc,
294 content::RenderViewHost* render_view_host) OVERRIDE; 295 content::RenderViewHost* render_view_host) OVERRIDE;
295 virtual void DocumentLoadedInFrame( 296 virtual void DocumentLoadedInFrame(
296 int64 frame_id, 297 int64 frame_id,
297 content::RenderViewHost* render_view_host) OVERRIDE; 298 content::RenderViewHost* render_view_host) OVERRIDE;
298 virtual bool OnMessageReceived( 299 virtual bool OnMessageReceived(
299 const IPC::Message& message, 300 const IPC::Message& message,
300 content::RenderFrameHost* render_frame_host) OVERRIDE; 301 content::RenderFrameHost* render_frame_host) OVERRIDE;
301 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; 302 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
302 virtual void WebContentsDestroyed() OVERRIDE;
303 virtual void UserAgentOverrideSet(const std::string& user_agent) OVERRIDE; 303 virtual void UserAgentOverrideSet(const std::string& user_agent) OVERRIDE;
304 virtual void RenderViewReady() OVERRIDE; 304 virtual void RenderViewReady() OVERRIDE;
305 305
306 // Informs the embedder of a frame name change. 306 // Informs the embedder of a frame name change.
307 void ReportFrameNameChange(const std::string& name); 307 void ReportFrameNameChange(const std::string& name);
308 308
309 // Called after the load handler is called in the guest's main frame. 309 // Called after the load handler is called in the guest's main frame.
310 void LoadHandlerCalled(); 310 void LoadHandlerCalled();
311 311
312 // Called when a redirect notification occurs. 312 // Called when a redirect notification occurs.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 name(name) {} 429 name(name) {}
430 }; 430 };
431 431
432 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; 432 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap;
433 PendingWindowMap pending_new_windows_; 433 PendingWindowMap pending_new_windows_;
434 434
435 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 435 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
436 }; 436 };
437 437
438 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ 438 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/guest_view/guest_view_base.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