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

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

Issue 12189018: <webview>: Implement WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Diff from latest patch Created 7 years, 10 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_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const BrowserPluginHostMsg_CreateGuest_Params& params) { 115 const BrowserPluginHostMsg_CreateGuest_Params& params) {
116 RecordAction(UserMetricsAction("BrowserPlugin.Guest.Create")); 116 RecordAction(UserMetricsAction("BrowserPlugin.Guest.Create"));
117 if (factory_) { 117 if (factory_) {
118 return factory_->CreateBrowserPluginGuest(instance_id, 118 return factory_->CreateBrowserPluginGuest(instance_id,
119 web_contents, 119 web_contents,
120 params); 120 params);
121 } 121 }
122 return new BrowserPluginGuest(instance_id, web_contents,params); 122 return new BrowserPluginGuest(instance_id, web_contents,params);
123 } 123 }
124 124
125 void BrowserPluginGuest::Destroy() {
126 GetContentClient()->browser()->GuestWebContentsDestroyed(
127 web_contents(), embedder_web_contents_);
128 }
129
125 void BrowserPluginGuest::UpdateVisibility() { 130 void BrowserPluginGuest::UpdateVisibility() {
126 OnSetVisibility(instance_id_, visible()); 131 OnSetVisibility(instance_id_, visible());
127 } 132 }
128 133
129 void BrowserPluginGuest::Observe(int type, 134 void BrowserPluginGuest::Observe(int type,
130 const NotificationSource& source, 135 const NotificationSource& source,
131 const NotificationDetails& details) { 136 const NotificationDetails& details) {
132 switch (type) { 137 switch (type) {
133 case NOTIFICATION_RESOURCE_RECEIVED_REDIRECT: { 138 case NOTIFICATION_RESOURCE_RECEIVED_REDIRECT: {
134 DCHECK_EQ(Source<WebContents>(source).ptr(), web_contents()); 139 DCHECK_EQ(Source<WebContents>(source).ptr(), web_contents());
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 relay_params.scroll_delta = params.scroll_delta; 731 relay_params.scroll_delta = params.scroll_delta;
727 relay_params.scroll_rect = params.scroll_rect; 732 relay_params.scroll_rect = params.scroll_rect;
728 relay_params.copy_rects = params.copy_rects; 733 relay_params.copy_rects = params.copy_rects;
729 734
730 SendMessageToEmbedder(new BrowserPluginMsg_UpdateRect(embedder_routing_id(), 735 SendMessageToEmbedder(new BrowserPluginMsg_UpdateRect(embedder_routing_id(),
731 instance_id(), 736 instance_id(),
732 relay_params)); 737 relay_params));
733 } 738 }
734 739
735 } // namespace content 740 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698