OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A BrowserPluginGuest is the browser side of a browser <--> embedder | 5 // A BrowserPluginGuest is the browser side of a browser <--> embedder |
6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder | 6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder |
7 // renderer side of browser <--> embedder renderer communication. | 7 // renderer side of browser <--> embedder renderer communication. |
8 // | 8 // |
9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a | 9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a |
10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The | 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 int error_code, | 148 int error_code, |
149 const string16& error_description, | 149 const string16& error_description, |
150 RenderViewHost* render_view_host) OVERRIDE; | 150 RenderViewHost* render_view_host) OVERRIDE; |
151 virtual void DidCommitProvisionalLoadForFrame( | 151 virtual void DidCommitProvisionalLoadForFrame( |
152 int64 frame_id, | 152 int64 frame_id, |
153 bool is_main_frame, | 153 bool is_main_frame, |
154 const GURL& url, | 154 const GURL& url, |
155 PageTransition transition_type, | 155 PageTransition transition_type, |
156 RenderViewHost* render_view_host) OVERRIDE; | 156 RenderViewHost* render_view_host) OVERRIDE; |
157 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; | 157 virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; |
158 | 158 virtual void DidUpdateFrameName(int frame_id, |
| 159 bool is_top_level, |
| 160 const std::string& name, |
| 161 RenderViewHost* render_view_host) OVERRIDE; |
159 virtual void RenderViewReady() OVERRIDE; | 162 virtual void RenderViewReady() OVERRIDE; |
160 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 163 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
161 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 164 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
162 | 165 |
163 | 166 |
164 // WebContentsDelegate implementation. | 167 // WebContentsDelegate implementation. |
165 | 168 |
166 // If a new window is created with target="_blank" and rel="noreferrer", then | 169 // If a new window is created with target="_blank" and rel="noreferrer", then |
167 // this method is called, indicating that the new WebContents is ready to be | 170 // this method is called, indicating that the new WebContents is ready to be |
168 // attached. | 171 // attached. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 void OnSetCursor(const WebCursor& cursor); | 373 void OnSetCursor(const WebCursor& cursor); |
371 // On MacOSX popups are painted by the browser process. We handle them here | 374 // On MacOSX popups are painted by the browser process. We handle them here |
372 // so that they are positioned correctly. | 375 // so that they are positioned correctly. |
373 #if defined(OS_MACOSX) | 376 #if defined(OS_MACOSX) |
374 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 377 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
375 #endif | 378 #endif |
376 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); | 379 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); |
377 // Overriden in tests. | 380 // Overriden in tests. |
378 virtual void OnTakeFocus(bool reverse); | 381 virtual void OnTakeFocus(bool reverse); |
379 void OnUpdateDragCursor(WebKit::WebDragOperation operation); | 382 void OnUpdateDragCursor(WebKit::WebDragOperation operation); |
380 void OnUpdateFrameName(int frame_id, | |
381 bool is_top_level, | |
382 const std::string& name); | |
383 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 383 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
384 | 384 |
385 // Helpers for |OnRespondPermission|. | 385 // Helpers for |OnRespondPermission|. |
386 void OnRespondPermissionDownload(int request_id, bool should_allow); | 386 void OnRespondPermissionDownload(int request_id, bool should_allow); |
387 void OnRespondPermissionGeolocation(int request_id, bool should_allow); | 387 void OnRespondPermissionGeolocation(int request_id, bool should_allow); |
388 void OnRespondPermissionMedia(int request_id, bool should_allow); | 388 void OnRespondPermissionMedia(int request_id, bool should_allow); |
389 void OnRespondPermissionNewWindow(int request_id, bool should_allow); | 389 void OnRespondPermissionNewWindow(int request_id, bool should_allow); |
390 | 390 |
391 // Requests download permission through embedder JavaScript API after | 391 // Requests download permission through embedder JavaScript API after |
392 // retrieving url information from IO thread. | 392 // retrieving url information from IO thread. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 445 |
446 typedef std::map<int, base::Callback<void(bool)> > DownloadRequestMap; | 446 typedef std::map<int, base::Callback<void(bool)> > DownloadRequestMap; |
447 DownloadRequestMap download_request_callback_map_; | 447 DownloadRequestMap download_request_callback_map_; |
448 | 448 |
449 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 449 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
450 }; | 450 }; |
451 | 451 |
452 } // namespace content | 452 } // namespace content |
453 | 453 |
454 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 454 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |