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

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: Updated 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 (src_.empty())
lazyboy 2012/09/13 19:14:15 if (!navigate_src_sent_) instead after my recent p
Fady Samuel 2012/09/19 14:38:09 Done.
154 return;
155 BrowserPluginManager::Get()->Send(
156 new BrowserPluginHostMsg_Stop(render_view_->GetRoutingID(),
157 instance_id_));
158 }
159
160 void BrowserPlugin::Reload() {
161 if (src_.empty())
lazyboy 2012/09/13 19:14:15 Same here, if (!navigation_src_sent_).
Fady Samuel 2012/09/19 14:38:09 Done.
162 return;
163 // Renavigate to the same URL if the guest has crashed.
164 if (guest_crashed_) {
165 SetSrcAttribute(src_);
166 return;
167 }
168 BrowserPluginManager::Get()->Send(
169 new BrowserPluginHostMsg_Reload(render_view_->GetRoutingID(),
170 instance_id_));
171 }
172
152 void BrowserPlugin::UpdateRect( 173 void BrowserPlugin::UpdateRect(
153 int message_id, 174 int message_id,
154 const BrowserPluginMsg_UpdateRect_Params& params) { 175 const BrowserPluginMsg_UpdateRect_Params& params) {
155 if (width() != params.view_size.width() || 176 if (width() != params.view_size.width() ||
156 height() != params.view_size.height()) { 177 height() != params.view_size.height()) {
157 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateRect_ACK( 178 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_UpdateRect_ACK(
158 render_view_->GetRoutingID(), 179 render_view_->GetRoutingID(),
159 instance_id_, 180 instance_id_,
160 message_id, 181 message_id,
161 gfx::Size(width(), height()))); 182 gfx::Size(width(), height())));
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 void* notify_data) { 473 void* notify_data) {
453 } 474 }
454 475
455 void BrowserPlugin::didFailLoadingFrameRequest( 476 void BrowserPlugin::didFailLoadingFrameRequest(
456 const WebKit::WebURL& url, 477 const WebKit::WebURL& url,
457 void* notify_data, 478 void* notify_data,
458 const WebKit::WebURLError& error) { 479 const WebKit::WebURLError& error) {
459 } 480 }
460 481
461 } // namespace content 482 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698