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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder_helper.cc

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 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h"
6 6
7 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 7 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
8 #include "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 #include "content/common/browser_plugin_messages.h" 9 #include "content/common/browser_plugin_messages.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
(...skipping 25 matching lines...) Expand all
36 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateGuest, 36 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateGuest,
37 OnNavigateGuest); 37 OnNavigateGuest);
38 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ResizeGuest, OnResizeGuest) 38 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ResizeGuest, OnResizeGuest)
39 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UpdateRect_ACK, OnUpdateRectACK); 39 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UpdateRect_ACK, OnUpdateRectACK);
40 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetFocus, OnSetFocus); 40 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetFocus, OnSetFocus);
41 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_HandleInputEvent, 41 IPC_MESSAGE_HANDLER_GENERIC(BrowserPluginHostMsg_HandleInputEvent,
42 OnHandleInputEvent(*static_cast<const IPC::SyncMessage*>(&message), 42 OnHandleInputEvent(*static_cast<const IPC::SyncMessage*>(&message),
43 &handled)) 43 &handled))
44 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, 44 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed,
45 OnPluginDestroyed); 45 OnPluginDestroyed);
46 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Back, OnBack)
47 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Forward, OnForward)
48 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Go, OnGo)
46 IPC_MESSAGE_UNHANDLED(handled = false) 49 IPC_MESSAGE_UNHANDLED(handled = false)
47 IPC_END_MESSAGE_MAP() 50 IPC_END_MESSAGE_MAP()
48 return handled; 51 return handled;
49 } 52 }
50 53
51 void BrowserPluginEmbedderHelper::OnResizeGuest( 54 void BrowserPluginEmbedderHelper::OnResizeGuest(
52 int instance_id, 55 int instance_id,
53 const BrowserPluginHostMsg_ResizeGuest_Params& params) { 56 const BrowserPluginHostMsg_ResizeGuest_Params& params) {
54 TransportDIB* damage_buffer = NULL; 57 TransportDIB* damage_buffer = NULL;
55 #if defined(OS_WIN) 58 #if defined(OS_WIN)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 144 }
142 145
143 void BrowserPluginEmbedderHelper::OnSetFocus(int instance_id, bool focused) { 146 void BrowserPluginEmbedderHelper::OnSetFocus(int instance_id, bool focused) {
144 embedder_->SetFocus(instance_id, focused); 147 embedder_->SetFocus(instance_id, focused);
145 } 148 }
146 149
147 void BrowserPluginEmbedderHelper::OnPluginDestroyed(int instance_id) { 150 void BrowserPluginEmbedderHelper::OnPluginDestroyed(int instance_id) {
148 embedder_->PluginDestroyed(instance_id); 151 embedder_->PluginDestroyed(instance_id);
149 } 152 }
150 153
154 void BrowserPluginEmbedderHelper::OnBack(int instance_id) {
155 embedder_->Back(instance_id);
156 }
157
158 void BrowserPluginEmbedderHelper::OnForward(int instance_id) {
159 embedder_->Forward(instance_id);
160 }
161
162 void BrowserPluginEmbedderHelper::OnGo(int instance_id, int relative_index) {
163 embedder_->Go(instance_id, relative_index);
164 }
165
151 } // namespace content 166 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698