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

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

Issue 291403002: Remove some RenderProcessHost::IsGuest call sites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android build 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 namespace gfx { 55 namespace gfx {
56 class Range; 56 class Range;
57 } 57 }
58 58
59 namespace content { 59 namespace content {
60 60
61 class BrowserPluginGuestManager; 61 class BrowserPluginGuestManager;
62 class BrowserPluginHostFactory; 62 class BrowserPluginHostFactory;
63 class RenderViewHostImpl;
63 class RenderWidgetHostView; 64 class RenderWidgetHostView;
64 class SiteInstance; 65 class SiteInstance;
65 class WebCursor; 66 class WebCursor;
66 struct DropData; 67 struct DropData;
67 struct MediaStreamRequest; 68 struct MediaStreamRequest;
68 69
69 // A browser plugin guest provides functionality for WebContents to operate in 70 // A browser plugin guest provides functionality for WebContents to operate in
70 // the guest role and implements guest-specific overrides for ViewHostMsg_* 71 // the guest role and implements guest-specific overrides for ViewHostMsg_*
71 // messages. 72 // messages.
72 // 73 //
(...skipping 16 matching lines...) Expand all
89 // type of WebContentsView to construct on initialization. The content 90 // type of WebContentsView to construct on initialization. The content
90 // embedder needs to be aware of |guest_site_instance| on the guest's 91 // embedder needs to be aware of |guest_site_instance| on the guest's
91 // construction and so we pass it in here. 92 // construction and so we pass it in here.
92 static BrowserPluginGuest* Create( 93 static BrowserPluginGuest* Create(
93 int instance_id, 94 int instance_id,
94 SiteInstance* guest_site_instance, 95 SiteInstance* guest_site_instance,
95 WebContentsImpl* web_contents, 96 WebContentsImpl* web_contents,
96 scoped_ptr<base::DictionaryValue> extra_params, 97 scoped_ptr<base::DictionaryValue> extra_params,
97 BrowserPluginGuest* opener); 98 BrowserPluginGuest* opener);
98 99
100 // Returns whether the given WebContents is a BrowserPlugin guest.
101 static bool IsGuest(WebContentsImpl* web_contents);
102
103 // Returns whether the given RenderviewHost is a BrowserPlugin guest.
104 static bool IsGuest(RenderViewHostImpl* render_view_host);
105
99 // Returns a WeakPtr to this BrowserPluginGuest. 106 // Returns a WeakPtr to this BrowserPluginGuest.
100 base::WeakPtr<BrowserPluginGuest> AsWeakPtr(); 107 base::WeakPtr<BrowserPluginGuest> AsWeakPtr();
101 108
102 // Sets the lock state of the pointer. Returns true if |allowed| is true and 109 // Sets the lock state of the pointer. Returns true if |allowed| is true and
103 // the mouse has been successfully locked. 110 // the mouse has been successfully locked.
104 bool LockMouse(bool allowed); 111 bool LockMouse(bool allowed);
105 112
106 // Called when the embedder WebContents is destroyed to give the 113 // Called when the embedder WebContents is destroyed to give the
107 // BrowserPluginGuest an opportunity to clean up after itself. 114 // BrowserPluginGuest an opportunity to clean up after itself.
108 void EmbedderDestroyed(); 115 void EmbedderDestroyed();
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 // Weak pointer used to ask GeolocationPermissionContext about geolocation 466 // Weak pointer used to ask GeolocationPermissionContext about geolocation
460 // permission. 467 // permission.
461 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 468 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
462 469
463 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 470 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
464 }; 471 };
465 472
466 } // namespace content 473 } // namespace content
467 474
468 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 475 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/extension_information.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698