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

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

Issue 549323002: BrowserPlugin: Interstitial Pages work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 namespace gfx { 60 namespace gfx {
61 class Range; 61 class Range;
62 } // namespace gfx 62 } // namespace gfx
63 63
64 namespace content { 64 namespace content {
65 65
66 class BrowserPluginGuestManager; 66 class BrowserPluginGuestManager;
67 class RenderViewHostImpl; 67 class RenderViewHostImpl;
68 class RenderWidgetHostView; 68 class RenderWidgetHostView;
69 class SiteInstance; 69 class SiteInstance;
70 class WebCursor;
71 struct DropData; 70 struct DropData;
72 71
73 // A browser plugin guest provides functionality for WebContents to operate in 72 // A browser plugin guest provides functionality for WebContents to operate in
74 // the guest role and implements guest-specific overrides for ViewHostMsg_* 73 // the guest role and implements guest-specific overrides for ViewHostMsg_*
75 // messages. 74 // messages.
76 // 75 //
77 // When a guest is initially created, it is in an unattached state. That is, 76 // When a guest is initially created, it is in an unattached state. That is,
78 // it is not visible anywhere and has no embedder WebContents assigned. 77 // it is not visible anywhere and has no embedder WebContents assigned.
79 // A BrowserPluginGuest is said to be "attached" if it has an embedder. 78 // A BrowserPluginGuest is said to be "attached" if it has an embedder.
80 // A BrowserPluginGuest can also create a new unattached guest via 79 // A BrowserPluginGuest can also create a new unattached guest via
(...skipping 15 matching lines...) Expand all
96 95
97 // Returns whether the given WebContents is a BrowserPlugin guest. 96 // Returns whether the given WebContents is a BrowserPlugin guest.
98 static bool IsGuest(WebContentsImpl* web_contents); 97 static bool IsGuest(WebContentsImpl* web_contents);
99 98
100 // Returns whether the given RenderviewHost is a BrowserPlugin guest. 99 // Returns whether the given RenderviewHost is a BrowserPlugin guest.
101 static bool IsGuest(RenderViewHostImpl* render_view_host); 100 static bool IsGuest(RenderViewHostImpl* render_view_host);
102 101
103 // Returns a WeakPtr to this BrowserPluginGuest. 102 // Returns a WeakPtr to this BrowserPluginGuest.
104 base::WeakPtr<BrowserPluginGuest> AsWeakPtr(); 103 base::WeakPtr<BrowserPluginGuest> AsWeakPtr();
105 104
105 // Sets the focus state of the current RenderWidgetHostView.
106 void SetFocus(RenderWidgetHost* rwh, bool focused);
107
106 // Sets the lock state of the pointer. Returns true if |allowed| is true and 108 // Sets the lock state of the pointer. Returns true if |allowed| is true and
107 // the mouse has been successfully locked. 109 // the mouse has been successfully locked.
108 bool LockMouse(bool allowed); 110 bool LockMouse(bool allowed);
109 111
110 // Return true if the mouse is locked. 112 // Return true if the mouse is locked.
111 bool mouse_locked() const { return mouse_locked_; } 113 bool mouse_locked() const { return mouse_locked_; }
112 114
113 // Called when the embedder WebContents changes visibility. 115 // Called when the embedder WebContents changes visibility.
114 void EmbedderVisibilityChanged(bool visible); 116 void EmbedderVisibilityChanged(bool visible);
115 117
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 bool keep_selection); 300 bool keep_selection);
299 void OnExtendSelectionAndDelete(int instance_id, int before, int after); 301 void OnExtendSelectionAndDelete(int instance_id, int before, int after);
300 void OnImeCancelComposition(); 302 void OnImeCancelComposition();
301 #if defined(OS_MACOSX) || defined(USE_AURA) 303 #if defined(OS_MACOSX) || defined(USE_AURA)
302 void OnImeCompositionRangeChanged( 304 void OnImeCompositionRangeChanged(
303 const gfx::Range& range, 305 const gfx::Range& range,
304 const std::vector<gfx::Rect>& character_bounds); 306 const std::vector<gfx::Rect>& character_bounds);
305 #endif 307 #endif
306 308
307 // Message handlers for messages from guest. 309 // Message handlers for messages from guest.
308
309 void OnDragStopped();
lazyboy 2014/09/09 07:04:45 Nice catch.
Fady Samuel 2014/09/09 17:14:48 Acknowledged.
310 void OnHandleInputEventAck( 310 void OnHandleInputEventAck(
311 blink::WebInputEvent::Type event_type, 311 blink::WebInputEvent::Type event_type,
312 InputEventAckState ack_result); 312 InputEventAckState ack_result);
313 void OnHasTouchEventHandlers(bool accept); 313 void OnHasTouchEventHandlers(bool accept);
314 void OnSetCursor(const WebCursor& cursor);
315 #if defined(OS_MACOSX) 314 #if defined(OS_MACOSX)
316 // On MacOS X popups are painted by the browser process. We handle them here 315 // On MacOS X popups are painted by the browser process. We handle them here
317 // so that they are positioned correctly. 316 // so that they are positioned correctly.
318 void OnShowPopup(RenderFrameHost* render_frame_host, 317 void OnShowPopup(RenderFrameHost* render_frame_host,
319 const FrameHostMsg_ShowPopup_Params& params); 318 const FrameHostMsg_ShowPopup_Params& params);
320 #endif 319 #endif
321 void OnShowWidget(int route_id, const gfx::Rect& initial_pos); 320 void OnShowWidget(int route_id, const gfx::Rect& initial_pos);
322 void OnTakeFocus(bool reverse); 321 void OnTakeFocus(bool reverse);
323 void OnUpdateFrameName(int frame_id, 322 void OnUpdateFrameName(int frame_id,
324 bool is_top_level, 323 bool is_top_level,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // Weak pointer used to ask GeolocationPermissionContext about geolocation 375 // Weak pointer used to ask GeolocationPermissionContext about geolocation
377 // permission. 376 // permission.
378 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 377 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
379 378
380 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 379 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
381 }; 380 };
382 381
383 } // namespace content 382 } // namespace content
384 383
385 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 384 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698