OLD | NEW |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // menu items to contain only the items from |items|. | 59 // menu items to contain only the items from |items|. |
60 // |items| == NULL means no filtering will be applied. | 60 // |items| == NULL means no filtering will be applied. |
61 void ShowContextMenu(int request_id, const MenuItemVector* items); | 61 void ShowContextMenu(int request_id, const MenuItemVector* items); |
62 | 62 |
63 // Sets the frame name of the guest. | 63 // Sets the frame name of the guest. |
64 void SetName(const std::string& name); | 64 void SetName(const std::string& name); |
65 | 65 |
66 // GuestViewBase implementation. | 66 // GuestViewBase implementation. |
67 virtual void Attach(content::WebContents* embedder_web_contents, | 67 virtual void Attach(content::WebContents* embedder_web_contents, |
68 const base::DictionaryValue& args) OVERRIDE; | 68 const base::DictionaryValue& args) OVERRIDE; |
| 69 virtual void DidStopLoading() OVERRIDE; |
69 virtual void EmbedderDestroyed() OVERRIDE; | 70 virtual void EmbedderDestroyed() OVERRIDE; |
| 71 virtual bool IsDragAndDropEnabled() const OVERRIDE; |
70 | 72 |
71 // WebContentsDelegate implementation. | 73 // WebContentsDelegate implementation. |
72 virtual bool AddMessageToConsole(content::WebContents* source, | 74 virtual bool AddMessageToConsole(content::WebContents* source, |
73 int32 level, | 75 int32 level, |
74 const base::string16& message, | 76 const base::string16& message, |
75 int32 line_no, | 77 int32 line_no, |
76 const base::string16& source_id) OVERRIDE; | 78 const base::string16& source_id) OVERRIDE; |
77 virtual void LoadProgressChanged(content::WebContents* source, | 79 virtual void LoadProgressChanged(content::WebContents* source, |
78 double progress) OVERRIDE; | 80 double progress) OVERRIDE; |
79 virtual void CloseContents(content::WebContents* source) OVERRIDE; | 81 virtual void CloseContents(content::WebContents* source) OVERRIDE; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 content::WebContents* source, | 119 content::WebContents* source, |
118 const content::OpenURLParams& params) OVERRIDE; | 120 const content::OpenURLParams& params) OVERRIDE; |
119 virtual void WebContentsCreated(content::WebContents* source_contents, | 121 virtual void WebContentsCreated(content::WebContents* source_contents, |
120 int opener_render_frame_id, | 122 int opener_render_frame_id, |
121 const base::string16& frame_name, | 123 const base::string16& frame_name, |
122 const GURL& target_url, | 124 const GURL& target_url, |
123 content::WebContents* new_contents) OVERRIDE; | 125 content::WebContents* new_contents) OVERRIDE; |
124 | 126 |
125 // BrowserPluginGuestDelegate implementation. | 127 // BrowserPluginGuestDelegate implementation. |
126 virtual void DidAttach() OVERRIDE; | 128 virtual void DidAttach() OVERRIDE; |
127 virtual bool IsDragAndDropEnabled() OVERRIDE; | |
128 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size) | 129 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size) |
129 OVERRIDE; | 130 OVERRIDE; |
130 virtual void RequestPointerLockPermission( | 131 virtual void RequestPointerLockPermission( |
131 bool user_gesture, | 132 bool user_gesture, |
132 bool last_unlocked_by_target, | 133 bool last_unlocked_by_target, |
133 const base::Callback<void(bool)>& callback) OVERRIDE; | 134 const base::Callback<void(bool)>& callback) OVERRIDE; |
134 virtual void NavigateGuest(const std::string& src) OVERRIDE; | 135 virtual void NavigateGuest(const std::string& src) OVERRIDE; |
135 virtual void Destroy() OVERRIDE; | 136 virtual void Destroy() OVERRIDE; |
136 | 137 |
137 // NotificationObserver implementation. | 138 // NotificationObserver implementation. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 int64 frame_id, | 288 int64 frame_id, |
288 int64 parent_frame_id, | 289 int64 parent_frame_id, |
289 bool is_main_frame, | 290 bool is_main_frame, |
290 const GURL& validated_url, | 291 const GURL& validated_url, |
291 bool is_error_page, | 292 bool is_error_page, |
292 bool is_iframe_srcdoc, | 293 bool is_iframe_srcdoc, |
293 content::RenderViewHost* render_view_host) OVERRIDE; | 294 content::RenderViewHost* render_view_host) OVERRIDE; |
294 virtual void DocumentLoadedInFrame( | 295 virtual void DocumentLoadedInFrame( |
295 int64 frame_id, | 296 int64 frame_id, |
296 content::RenderViewHost* render_view_host) OVERRIDE; | 297 content::RenderViewHost* render_view_host) OVERRIDE; |
297 virtual void DidStopLoading( | |
298 content::RenderViewHost* render_view_host) OVERRIDE; | |
299 virtual bool OnMessageReceived( | 298 virtual bool OnMessageReceived( |
300 const IPC::Message& message, | 299 const IPC::Message& message, |
301 content::RenderFrameHost* render_frame_host) OVERRIDE; | 300 content::RenderFrameHost* render_frame_host) OVERRIDE; |
302 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; | 301 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; |
303 virtual void WebContentsDestroyed() OVERRIDE; | 302 virtual void WebContentsDestroyed() OVERRIDE; |
304 virtual void UserAgentOverrideSet(const std::string& user_agent) OVERRIDE; | 303 virtual void UserAgentOverrideSet(const std::string& user_agent) OVERRIDE; |
305 virtual void RenderViewReady() OVERRIDE; | 304 virtual void RenderViewReady() OVERRIDE; |
306 | 305 |
307 // Informs the embedder of a frame name change. | 306 // Informs the embedder of a frame name change. |
308 void ReportFrameNameChange(const std::string& name); | 307 void ReportFrameNameChange(const std::string& name); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 name(name) {} | 429 name(name) {} |
431 }; | 430 }; |
432 | 431 |
433 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; | 432 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; |
434 PendingWindowMap pending_new_windows_; | 433 PendingWindowMap pending_new_windows_; |
435 | 434 |
436 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 435 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
437 }; | 436 }; |
438 | 437 |
439 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 438 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |