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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 13375003: Fixing iframe jank in the local omnibox popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing comment. Created 7 years, 8 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 "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Treat CDM invocations like JavaScript. 215 // Treat CDM invocations like JavaScript.
216 if (plugin.name == ASCIIToUTF16(kWidevineCdmPluginName)) { 216 if (plugin.name == ASCIIToUTF16(kWidevineCdmPluginName)) {
217 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS); 217 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
218 return true; 218 return true;
219 } 219 }
220 #endif // WIDEVINE_CDM_AVAILABLE 220 #endif // WIDEVINE_CDM_AVAILABLE
221 221
222 return false; 222 return false;
223 } 223 }
224 224
225 content::RenderView* GetRenderViewFromWebFrame(WebKit::WebFrame* webframe) {
226 if (!webframe)
227 return NULL;
228 WebKit::WebView* webview = webframe->view();
229 if (!webview)
230 return NULL;
231 return content::RenderView::FromWebView(webview);
232 }
233
234 } // namespace 225 } // namespace
235 226
236 namespace chrome { 227 namespace chrome {
237 228
238 ChromeContentRendererClient::ChromeContentRendererClient() { 229 ChromeContentRendererClient::ChromeContentRendererClient() {
239 g_current_client = this; 230 g_current_client = this;
240 } 231 }
241 232
242 ChromeContentRendererClient::~ChromeContentRendererClient() { 233 ChromeContentRendererClient::~ChromeContentRendererClient() {
243 g_current_client = NULL; 234 g_current_client = NULL;
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 } 984 }
994 985
995 if (url.SchemeIs(chrome::kExtensionResourceScheme) && 986 if (url.SchemeIs(chrome::kExtensionResourceScheme) &&
996 !extensions::ResourceRequestPolicy::CanRequestExtensionResourceScheme( 987 !extensions::ResourceRequestPolicy::CanRequestExtensionResourceScheme(
997 url, 988 url,
998 frame)) { 989 frame)) {
999 *new_url = GURL(chrome::kExtensionResourceInvalidRequestURL); 990 *new_url = GURL(chrome::kExtensionResourceInvalidRequestURL);
1000 return true; 991 return true;
1001 } 992 }
1002 993
1003 const content::RenderView* render_view = GetRenderViewFromWebFrame(frame);
1004 if (SearchBox* search_box = SearchBox::Get(render_view)) {
1005 if (url.SchemeIs(chrome::kChromeSearchScheme) &&
1006 url.host() == chrome::kChromeSearchSuggestionHost) {
1007 if (search_box->GenerateDataURLForSuggestionRequest(url, new_url))
1008 return true;
1009 }
1010 }
1011
1012 return false; 994 return false;
1013 } 995 }
1014 996
1015 bool ChromeContentRendererClient::ShouldPumpEventsDuringCookieMessage() { 997 bool ChromeContentRendererClient::ShouldPumpEventsDuringCookieMessage() {
1016 // We no longer pump messages, even under Chrome Frame. We rely on cookie 998 // We no longer pump messages, even under Chrome Frame. We rely on cookie
1017 // read requests handled by CF not putting up UI or causing other actions 999 // read requests handled by CF not putting up UI or causing other actions
1018 // that would require us to pump messages. This fixes http://crbug.com/110090. 1000 // that would require us to pump messages. This fixes http://crbug.com/110090.
1019 return false; 1001 return false;
1020 } 1002 }
1021 1003
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 1214
1233 for (size_t i = 0; i < request_os_file_handle_allowed_hosts_.size(); ++i) { 1215 for (size_t i = 0; i < request_os_file_handle_allowed_hosts_.size(); ++i) {
1234 if (MatchPattern(inner.host(), request_os_file_handle_allowed_hosts_[i])) 1216 if (MatchPattern(inner.host(), request_os_file_handle_allowed_hosts_[i]))
1235 return true; 1217 return true;
1236 } 1218 }
1237 1219
1238 return false; 1220 return false;
1239 } 1221 }
1240 1222
1241 } // namespace chrome 1223 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698