OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 if (is_extension_url != extension_dispatcher_->is_extension_process()) | 1272 if (is_extension_url != extension_dispatcher_->is_extension_process()) |
1273 return true; | 1273 return true; |
1274 } | 1274 } |
1275 #endif // defined(ENABLE_EXTENSIONS) | 1275 #endif // defined(ENABLE_EXTENSIONS) |
1276 | 1276 |
1277 return false; | 1277 return false; |
1278 } | 1278 } |
1279 | 1279 |
1280 bool ChromeContentRendererClient::WillSendRequest( | 1280 bool ChromeContentRendererClient::WillSendRequest( |
1281 blink::WebFrame* frame, | 1281 blink::WebFrame* frame, |
1282 content::PageTransition transition_type, | 1282 ui::PageTransition transition_type, |
1283 const GURL& url, | 1283 const GURL& url, |
1284 const GURL& first_party_for_cookies, | 1284 const GURL& first_party_for_cookies, |
1285 GURL* new_url) { | 1285 GURL* new_url) { |
1286 // Check whether the request should be allowed. If not allowed, we reset the | 1286 // Check whether the request should be allowed. If not allowed, we reset the |
1287 // URL to something invalid to prevent the request and cause an error. | 1287 // URL to something invalid to prevent the request and cause an error. |
1288 #if defined(ENABLE_EXTENSIONS) | 1288 #if defined(ENABLE_EXTENSIONS) |
1289 if (url.SchemeIs(extensions::kExtensionScheme) && | 1289 if (url.SchemeIs(extensions::kExtensionScheme) && |
1290 !extensions::ResourceRequestPolicy::CanRequestResource( | 1290 !extensions::ResourceRequestPolicy::CanRequestResource( |
1291 url, | 1291 url, |
1292 frame, | 1292 frame, |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 content::BrowserPluginDelegate* | 1570 content::BrowserPluginDelegate* |
1571 ChromeContentRendererClient::CreateBrowserPluginDelegate( | 1571 ChromeContentRendererClient::CreateBrowserPluginDelegate( |
1572 content::RenderFrame* render_frame, | 1572 content::RenderFrame* render_frame, |
1573 const std::string& mime_type) { | 1573 const std::string& mime_type) { |
1574 #if defined(ENABLE_EXTENSIONS) | 1574 #if defined(ENABLE_EXTENSIONS) |
1575 return new extensions::GuestViewContainer(render_frame, mime_type); | 1575 return new extensions::GuestViewContainer(render_frame, mime_type); |
1576 #else | 1576 #else |
1577 return NULL; | 1577 return NULL; |
1578 #endif | 1578 #endif |
1579 } | 1579 } |
OLD | NEW |