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

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: Addressed John's comments 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 bool privileged); 320 bool privileged);
321 void OnLockMouseAck(int instance_id, bool succeeded); 321 void OnLockMouseAck(int instance_id, bool succeeded);
322 void OnNavigateGuest(int instance_id, const std::string& src); 322 void OnNavigateGuest(int instance_id, const std::string& src);
323 void OnPluginDestroyed(int instance_id); 323 void OnPluginDestroyed(int instance_id);
324 // Resizes the guest's web contents. 324 // Resizes the guest's web contents.
325 // Overridden in tests. 325 // Overridden in tests.
326 virtual void OnResizeGuest( 326 virtual void OnResizeGuest(
327 int instance_id, const BrowserPluginHostMsg_ResizeGuest_Params& params); 327 int instance_id, const BrowserPluginHostMsg_ResizeGuest_Params& params);
328 // Overridden in tests. 328 // Overridden in tests.
329 virtual void OnSetFocus(int instance_id, bool focused); 329 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. 330 // Updates the size state of the guest.
334 void OnSetSize( 331 void OnSetSize(
335 int instance_id, 332 int instance_id,
336 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, 333 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
337 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params); 334 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params);
338 void OnSetEditCommandsForNextKeyEvent( 335 void OnSetEditCommandsForNextKeyEvent(
339 int instance_id, 336 int instance_id,
340 const std::vector<EditCommand>& edit_commands); 337 const std::vector<EditCommand>& edit_commands);
341 void OnSetContentsOpaque(int instance_id, bool opaque); 338 void OnSetContentsOpaque(int instance_id, bool opaque);
342 // The guest WebContents is visible if both its embedder is visible and 339 // 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); 387 void OnHasTouchEventHandlers(bool accept);
391 void OnSetCursor(const WebCursor& cursor); 388 void OnSetCursor(const WebCursor& cursor);
392 // On MacOSX popups are painted by the browser process. We handle them here 389 // On MacOSX popups are painted by the browser process. We handle them here
393 // so that they are positioned correctly. 390 // so that they are positioned correctly.
394 #if defined(OS_MACOSX) 391 #if defined(OS_MACOSX)
395 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params); 392 void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params);
396 #endif 393 #endif
397 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); 394 void OnShowWidget(int route_id, const gfx::Rect& initial_pos);
398 // Overridden in tests. 395 // Overridden in tests.
399 virtual void OnTakeFocus(bool reverse); 396 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); 397 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
404 398
405 // Forwards all messages from the |pending_messages_| queue to the embedder. 399 // Forwards all messages from the |pending_messages_| queue to the embedder.
406 void SendQueuedMessages(); 400 void SendQueuedMessages();
407 401
408 // Static factory instance (always NULL for non-test). 402 // Static factory instance (always NULL for non-test).
409 static BrowserPluginHostFactory* factory_; 403 static BrowserPluginHostFactory* factory_;
410 404
411 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; 405 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_;
412 WebContentsImpl* embedder_web_contents_; 406 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 456 // Weak pointer used to ask GeolocationPermissionContext about geolocation
463 // permission. 457 // permission.
464 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 458 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
465 459
466 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 460 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
467 }; 461 };
468 462
469 } // namespace content 463 } // namespace content
470 464
471 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 465 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/web_view.js ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698