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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 10917225: Browser Plugin: Reload and Stop operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nit 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::Stop() {
153 if (!navigate_src_sent_)
154 return;
155 BrowserPluginManager::Get()->Send(
156 new BrowserPluginHostMsg_Stop(render_view_->GetRoutingID(),
157 instance_id_));
158 }
159
160 void BrowserPlugin::Reload() {
161 if (!navigate_src_sent_)
162 return;
163 guest_crashed_ = false;
164 BrowserPluginManager::Get()->Send(
165 new BrowserPluginHostMsg_Reload(render_view_->GetRoutingID(),
166 instance_id_));
167 }
168
152 void BrowserPlugin::UpdateRect( 169 void BrowserPlugin::UpdateRect(
153 int message_id, 170 int message_id,
154 const BrowserPluginMsg_UpdateRect_Params& params) { 171 const BrowserPluginMsg_UpdateRect_Params& params) {
155 if (width() != params.view_size.width() || 172 if (width() != params.view_size.width() ||
156 height() != params.view_size.height()) { 173 height() != params.view_size.height()) {
157 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateRect_ACK( 174 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateRect_ACK(
158 render_view_->GetRoutingID(), 175 render_view_->GetRoutingID(),
159 instance_id_, 176 instance_id_,
160 message_id, 177 message_id,
161 gfx::Size(width(), height()))); 178 gfx::Size(width(), height())));
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 void* notify_data) { 470 void* notify_data) {
454 } 471 }
455 472
456 void BrowserPlugin::didFailLoadingFrameRequest( 473 void BrowserPlugin::didFailLoadingFrameRequest(
457 const WebKit::WebURL& url, 474 const WebKit::WebURL& url,
458 void* notify_data, 475 void* notify_data,
459 const WebKit::WebURLError& error) { 476 const WebKit::WebURLError& error) {
460 } 477 }
461 478
462 } // namespace content 479 } // 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