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

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

Issue 11048023: Browser Plugin: Implement terminate() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged 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/browser/browser_plugin/browser_plugin_embedder.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 if (guest) 276 if (guest)
277 guest->Stop(); 277 guest->Stop();
278 } 278 }
279 279
280 void BrowserPluginEmbedder::Reload(int instance_id) { 280 void BrowserPluginEmbedder::Reload(int instance_id) {
281 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); 281 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
282 if (guest) 282 if (guest)
283 guest->Reload(); 283 guest->Reload();
284 } 284 }
285 285
286 void BrowserPluginEmbedder::TerminateGuest(int instance_id) {
287 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
288 if (guest)
289 guest->Terminate();
290 }
291
286 void BrowserPluginEmbedder::Observe(int type, 292 void BrowserPluginEmbedder::Observe(int type,
287 const NotificationSource& source, 293 const NotificationSource& source,
288 const NotificationDetails& details) { 294 const NotificationDetails& details) {
289 switch (type) { 295 switch (type) {
290 case NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED: { 296 case NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED: {
291 bool visible = *Details<bool>(details).ptr(); 297 bool visible = *Details<bool>(details).ptr();
292 WebContentsVisibilityChanged(visible); 298 WebContentsVisibilityChanged(visible);
293 break; 299 break;
294 } 300 }
295 default: 301 default:
296 NOTREACHED() << "Unexpected notification type: " << type; 302 NOTREACHED() << "Unexpected notification type: " << type;
297 } 303 }
298 } 304 }
299 305
300 } // namespace content 306 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698