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

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

Issue 10960003: Browser Plugin: Implement Back, Forward, and Go. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a test Created 8 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 | Annotate | Revision Log
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 represents the browser side of browser <--> renderer 5 // A BrowserPluginGuest represents the browser side of browser <--> renderer
6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of 6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of
7 // browser <--> guest renderer communication. The 'guest' renderer is a 7 // browser <--> guest renderer communication. The 'guest' renderer is a
8 // <browser> tag. 8 // <browser> tag.
9 // 9 //
10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a 10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // embedder) instead of default view/widget host. 138 // embedder) instead of default view/widget host.
139 void HandleInputEventAck(RenderViewHost* render_view_host, bool handled); 139 void HandleInputEventAck(RenderViewHost* render_view_host, bool handled);
140 140
141 // Helper to send messages to embedder. Overridden in test implementation 141 // Helper to send messages to embedder. Overridden in test implementation
142 // since we want to intercept certain messages for testing. 142 // since we want to intercept certain messages for testing.
143 virtual void SendMessageToEmbedder(IPC::Message* msg); 143 virtual void SendMessageToEmbedder(IPC::Message* msg);
144 // Overridden in tests. 144 // Overridden in tests.
145 virtual void SetFocus(bool focused); 145 virtual void SetFocus(bool focused);
146 // Overridden in tests. 146 // Overridden in tests.
147 virtual bool ViewTakeFocus(bool reverse); 147 virtual bool ViewTakeFocus(bool reverse);
148 virtual void Back();
149 virtual void Forward();
150 virtual void Go(int relative_index);
148 151
149 // Static factory instance (always NULL for non-test). 152 // Static factory instance (always NULL for non-test).
150 static content::BrowserPluginHostFactory* factory_; 153 static content::BrowserPluginHostFactory* factory_;
151 154
152 RenderProcessHost* embedder_render_process_host_; 155 RenderProcessHost* embedder_render_process_host_;
153 // An identifier that uniquely identifies a browser plugin guest within an 156 // An identifier that uniquely identifies a browser plugin guest within an
154 // embedder. 157 // embedder.
155 int instance_id_; 158 int instance_id_;
156 scoped_ptr<TransportDIB> damage_buffer_; 159 scoped_ptr<TransportDIB> damage_buffer_;
157 #if defined(OS_WIN) 160 #if defined(OS_WIN)
158 size_t damage_buffer_size_; 161 size_t damage_buffer_size_;
159 #endif 162 #endif
160 gfx::Size damage_view_size_; 163 gfx::Size damage_view_size_;
161 float damage_buffer_scale_factor_; 164 float damage_buffer_scale_factor_;
162 scoped_ptr<IPC::Message> pending_input_event_reply_; 165 scoped_ptr<IPC::Message> pending_input_event_reply_;
163 gfx::Rect guest_rect_; 166 gfx::Rect guest_rect_;
164 WebCursor cursor_; 167 WebCursor cursor_;
165 IDMap<RenderViewHost> pending_updates_; 168 IDMap<RenderViewHost> pending_updates_;
166 int pending_update_counter_; 169 int pending_update_counter_;
167 base::TimeDelta guest_hang_timeout_; 170 base::TimeDelta guest_hang_timeout_;
168 171
169 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 172 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
170 }; 173 };
171 174
172 } // namespace content 175 } // namespace content
173 176
174 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 177 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698