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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 291483010: <webview>: Move name attribute to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newwindow_refactor
Patch Set: Merge with ToT Created 6 years, 7 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 (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. Any 9 // BrowserPluginGuest lives on the UI thread of the browser process. Any
10 // messages about the guest render process that the embedder might be interested 10 // messages about the guest render process that the embedder might be interested
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 const gfx::Rect& selection_rect, 198 const gfx::Rect& selection_rect,
199 int active_match_ordinal, 199 int active_match_ordinal,
200 bool final_update) OVERRIDE; 200 bool final_update) OVERRIDE;
201 virtual WebContents* OpenURLFromTab(WebContents* source, 201 virtual WebContents* OpenURLFromTab(WebContents* source,
202 const OpenURLParams& params) OVERRIDE; 202 const OpenURLParams& params) OVERRIDE;
203 virtual void WebContentsCreated(WebContents* source_contents, 203 virtual void WebContentsCreated(WebContents* source_contents,
204 int opener_render_frame_id, 204 int opener_render_frame_id,
205 const base::string16& frame_name, 205 const base::string16& frame_name,
206 const GURL& target_url, 206 const GURL& target_url,
207 WebContents* new_contents) OVERRIDE; 207 WebContents* new_contents) OVERRIDE;
208 virtual void FrameNameChanged(int render_frame_id,
209 bool is_top_level,
210 const std::string& name) OVERRIDE;
208 virtual void RendererUnresponsive(WebContents* source) OVERRIDE; 211 virtual void RendererUnresponsive(WebContents* source) OVERRIDE;
209 virtual void RendererResponsive(WebContents* source) OVERRIDE; 212 virtual void RendererResponsive(WebContents* source) OVERRIDE;
210 virtual void RunFileChooser(WebContents* web_contents, 213 virtual void RunFileChooser(WebContents* web_contents,
211 const FileChooserParams& params) OVERRIDE; 214 const FileChooserParams& params) OVERRIDE;
212 virtual bool ShouldFocusPageAfterCrash() OVERRIDE; 215 virtual bool ShouldFocusPageAfterCrash() OVERRIDE;
213 virtual void RequestMediaAccessPermission( 216 virtual void RequestMediaAccessPermission(
214 WebContents* web_contents, 217 WebContents* web_contents,
215 const MediaStreamRequest& request, 218 const MediaStreamRequest& request,
216 const MediaResponseCallback& callback) OVERRIDE; 219 const MediaResponseCallback& callback) OVERRIDE;
217 virtual bool PreHandleGestureEvent( 220 virtual bool PreHandleGestureEvent(
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 bool privileged); 323 bool privileged);
321 void OnLockMouseAck(int instance_id, bool succeeded); 324 void OnLockMouseAck(int instance_id, bool succeeded);
322 void OnNavigateGuest(int instance_id, const std::string& src); 325 void OnNavigateGuest(int instance_id, const std::string& src);
323 void OnPluginDestroyed(int instance_id); 326 void OnPluginDestroyed(int instance_id);
324 // Resizes the guest's web contents. 327 // Resizes the guest's web contents.
325 // Overridden in tests. 328 // Overridden in tests.
326 virtual void OnResizeGuest( 329 virtual void OnResizeGuest(
327 int instance_id, const BrowserPluginHostMsg_ResizeGuest_Params& params); 330 int instance_id, const BrowserPluginHostMsg_ResizeGuest_Params& params);
328 // Overridden in tests. 331 // Overridden in tests.
329 virtual void OnSetFocus(int instance_id, bool focused); 332 virtual void OnSetFocus(int instance_id, bool focused);
330 // Sets the name of the guest so that other guests in the same partition can
331 // access it.
332 void OnSetName(int instance_id, const std::string& name);
333 // Updates the size state of the guest. 333 // Updates the size state of the guest.
334 void OnSetSize( 334 void OnSetSize(
335 int instance_id, 335 int instance_id,
336 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, 336 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
337 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); 337 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params);
338 void OnSetEditCommandsForNextKeyEvent( 338 void OnSetEditCommandsForNextKeyEvent(
339 int instance_id, 339 int instance_id,
340 const std::vector<EditCommand>& edit_commands); 340 const std::vector<EditCommand>& edit_commands);
341 void OnSetContentsOpaque(int instance_id, bool opaque); 341 void OnSetContentsOpaque(int instance_id, bool opaque);
342 // The guest WebContents is visible if both its embedder is visible and 342 // The guest WebContents is visible if both its embedder is visible and
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 void OnHasTouchEventHandlers(bool accept); 390 void OnHasTouchEventHandlers(bool accept);
391 void OnSetCursor(const WebCursor& cursor); 391 void OnSetCursor(const WebCursor& cursor);
392 // On MacOSX popups are painted by the browser process. We handle them here 392 // On MacOSX popups are painted by the browser process. We handle them here
393 // so that they are positioned correctly. 393 // so that they are positioned correctly.
394 #if defined(OS_MACOSX) 394 #if defined(OS_MACOSX)
395 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); 395 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params);
396 #endif 396 #endif
397 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); 397 void OnShowWidget(int route_id, const gfx::Rect& initial_pos);
398 // Overridden in tests. 398 // Overridden in tests.
399 virtual void OnTakeFocus(bool reverse); 399 virtual void OnTakeFocus(bool reverse);
400 void OnUpdateFrameName(int frame_id,
401 bool is_top_level,
402 const std::string& name);
403 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); 400 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
404 401
405 // Forwards all messages from the |pending_messages_| queue to the embedder. 402 // Forwards all messages from the |pending_messages_| queue to the embedder.
406 void SendQueuedMessages(); 403 void SendQueuedMessages();
407 404
408 // Static factory instance (always NULL for non-test). 405 // Static factory instance (always NULL for non-test).
409 static BrowserPluginHostFactory* factory_; 406 static BrowserPluginHostFactory* factory_;
410 407
411 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; 408 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_;
412 WebContentsImpl* embedder_web_contents_; 409 WebContentsImpl* embedder_web_contents_;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 // Weak pointer used to ask GeolocationPermissionContext about geolocation 459 // Weak pointer used to ask GeolocationPermissionContext about geolocation
463 // permission. 460 // permission.
464 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 461 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
465 462
466 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 463 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
467 }; 464 };
468 465
469 } // namespace content 466 } // namespace content
470 467
471 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 468 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698