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

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

Issue 299753011: Move allocate instance id to chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 6 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // this BrowserPluginGuest, and its new unattached windows. 117 // this BrowserPluginGuest, and its new unattached windows.
118 void Destroy(); 118 void Destroy();
119 119
120 // Returns the identifier that uniquely identifies a browser plugin guest 120 // Returns the identifier that uniquely identifies a browser plugin guest
121 // within an embedder. 121 // within an embedder.
122 int instance_id() const { return instance_id_; } 122 int instance_id() const { return instance_id_; }
123 123
124 bool OnMessageReceivedFromEmbedder(const IPC::Message& message); 124 bool OnMessageReceivedFromEmbedder(const IPC::Message& message);
125 125
126 void Initialize(const BrowserPluginHostMsg_Attach_Params& params, 126 void Initialize(const BrowserPluginHostMsg_Attach_Params& params,
127 WebContentsImpl* embedder_web_contents); 127 WebContentsImpl* embedder_web_contents,
128 const base::DictionaryValue& extra_params);
128 129
129 WebContentsImpl* embedder_web_contents() const { 130 WebContentsImpl* embedder_web_contents() const {
130 return embedder_web_contents_; 131 return embedder_web_contents_;
131 } 132 }
132 133
133 // Returns the embedder's RenderWidgetHostView if it is available. 134 // Returns the embedder's RenderWidgetHostView if it is available.
134 // Returns NULL otherwise. 135 // Returns NULL otherwise.
135 RenderWidgetHostView* GetEmbedderRenderWidgetHostView(); 136 RenderWidgetHostView* GetEmbedderRenderWidgetHostView();
136 137
137 bool focused() const { return focused_; } 138 bool focused() const { return focused_; }
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 392
392 bool is_in_destruction_; 393 bool is_in_destruction_;
393 394
394 // Text input type states. 395 // Text input type states.
395 ui::TextInputType last_text_input_type_; 396 ui::TextInputType last_text_input_type_;
396 ui::TextInputMode last_input_mode_; 397 ui::TextInputMode last_input_mode_;
397 bool last_can_compose_inline_; 398 bool last_can_compose_inline_;
398 399
399 // This is a queue of messages that are destined to be sent to the embedder 400 // This is a queue of messages that are destined to be sent to the embedder
400 // once the guest is attached to a particular embedder. 401 // once the guest is attached to a particular embedder.
401 std::queue<IPC::Message*> pending_messages_; 402 std::queue<IPC::Message*> pending_messages_;
Fady Samuel 2014/05/29 20:35:23 Can we convert this to: std::deque<linked_ptr<IPC
lazyboy 2014/05/30 05:48:21 Done.
402 403
403 scoped_ptr<BrowserPluginGuestDelegate> delegate_; 404 scoped_ptr<BrowserPluginGuestDelegate> delegate_;
404 405
405 // Weak pointer used to ask GeolocationPermissionContext about geolocation 406 // Weak pointer used to ask GeolocationPermissionContext about geolocation
406 // permission. 407 // permission.
407 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 408 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
408 409
409 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 410 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
410 }; 411 };
411 412
412 } // namespace content 413 } // namespace content
413 414
414 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 415 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698