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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.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/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #if defined (OS_WIN) 9 #if defined (OS_WIN)
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 EventListeners& listeners = 142 EventListeners& listeners =
143 event_listener_map_[event_listener_map_iter->first]; 143 event_listener_map_[event_listener_map_iter->first];
144 EventListeners::iterator it = listeners.begin(); 144 EventListeners::iterator it = listeners.begin();
145 for (; it != listeners.end(); ++it) { 145 for (; it != listeners.end(); ++it) {
146 it->Dispose(); 146 it->Dispose();
147 } 147 }
148 } 148 }
149 event_listener_map_.clear(); 149 event_listener_map_.clear();
150 } 150 }
151 151
152 void BrowserPlugin::Back() {
153 if (!navigate_src_sent_)
154 return;
155 BrowserPluginManager::Get()->Send(
lazyboy 2012/09/20 20:05:42 Can we reduce this and next messages and use BPHos
Fady Samuel 2012/09/21 15:21:56 We can, but I don't know if these are identical op
156 new BrowserPluginHostMsg_Back(render_view_->GetRoutingID(),
157 instance_id_));
158 }
159
160 void BrowserPlugin::Forward() {
161 if (!navigate_src_sent_)
162 return;
163 BrowserPluginManager::Get()->Send(
164 new BrowserPluginHostMsg_Forward(render_view_->GetRoutingID(),
165 instance_id_));
166 }
167
168 void BrowserPlugin::Go(int relative_index) {
169 if (!navigate_src_sent_)
170 return;
171 BrowserPluginManager::Get()->Send(
172 new BrowserPluginHostMsg_Go(render_view_->GetRoutingID(),
173 instance_id_,
174 relative_index));
175 }
176
152 void BrowserPlugin::UpdateRect( 177 void BrowserPlugin::UpdateRect(
153 int message_id, 178 int message_id,
154 const BrowserPluginMsg_UpdateRect_Params& params) { 179 const BrowserPluginMsg_UpdateRect_Params& params) {
155 if (width() != params.view_size.width() || 180 if (width() != params.view_size.width() ||
156 height() != params.view_size.height()) { 181 height() != params.view_size.height()) {
157 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateRect_ACK( 182 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateRect_ACK(
158 render_view_->GetRoutingID(), 183 render_view_->GetRoutingID(),
159 instance_id_, 184 instance_id_,
160 message_id, 185 message_id,
161 gfx::Size(width(), height()))); 186 gfx::Size(width(), height())));
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 void* notify_data) { 478 void* notify_data) {
454 } 479 }
455 480
456 void BrowserPlugin::didFailLoadingFrameRequest( 481 void BrowserPlugin::didFailLoadingFrameRequest(
457 const WebKit::WebURL& url, 482 const WebKit::WebURL& url,
458 void* notify_data, 483 void* notify_data,
459 const WebKit::WebURLError& error) { 484 const WebKit::WebURLError& error) {
460 } 485 }
461 486
462 } // namespace content 487 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698