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

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: Merge with ToT Created 8 years, 2 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 EventListeners& listeners = 193 EventListeners& listeners =
194 event_listener_map_[event_listener_map_iter->first]; 194 event_listener_map_[event_listener_map_iter->first];
195 EventListeners::iterator it = listeners.begin(); 195 EventListeners::iterator it = listeners.begin();
196 for (; it != listeners.end(); ++it) { 196 for (; it != listeners.end(); ++it) {
197 it->Dispose(); 197 it->Dispose();
198 } 198 }
199 } 199 }
200 event_listener_map_.clear(); 200 event_listener_map_.clear();
201 } 201 }
202 202
203 void BrowserPlugin::Back() {
204 if (!navigate_src_sent_)
205 return;
206 BrowserPluginManager::Get()->Send(
207 new BrowserPluginHostMsg_Go(render_view_->GetRoutingID(),
208 instance_id_, -1));
209 }
210
211 void BrowserPlugin::Forward() {
212 if (!navigate_src_sent_)
213 return;
214 BrowserPluginManager::Get()->Send(
215 new BrowserPluginHostMsg_Go(render_view_->GetRoutingID(),
216 instance_id_, 1));
217 }
218
219 void BrowserPlugin::Go(int relative_index) {
220 if (!navigate_src_sent_)
221 return;
222 BrowserPluginManager::Get()->Send(
223 new BrowserPluginHostMsg_Go(render_view_->GetRoutingID(),
224 instance_id_,
225 relative_index));
226 }
227
203 void BrowserPlugin::Stop() { 228 void BrowserPlugin::Stop() {
204 if (!navigate_src_sent_) 229 if (!navigate_src_sent_)
205 return; 230 return;
206 BrowserPluginManager::Get()->Send( 231 BrowserPluginManager::Get()->Send(
207 new BrowserPluginHostMsg_Stop(render_view_->GetRoutingID(), 232 new BrowserPluginHostMsg_Stop(render_view_->GetRoutingID(),
208 instance_id_)); 233 instance_id_));
209 } 234 }
210 235
211 void BrowserPlugin::Reload() { 236 void BrowserPlugin::Reload() {
212 if (!navigate_src_sent_) 237 if (!navigate_src_sent_)
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 void* notify_data) { 552 void* notify_data) {
528 } 553 }
529 554
530 void BrowserPlugin::didFailLoadingFrameRequest( 555 void BrowserPlugin::didFailLoadingFrameRequest(
531 const WebKit::WebURL& url, 556 const WebKit::WebURL& url,
532 void* notify_data, 557 void* notify_data,
533 const WebKit::WebURLError& error) { 558 const WebKit::WebURLError& error) {
534 } 559 }
535 560
536 } // namespace content 561 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/browser_plugin/browser_plugin_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698