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/browser/ui/browser_navigator.h" | 5 #include "chrome/browser/ui/browser_navigator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 | 389 |
390 void Navigate(NavigateParams* params) { | 390 void Navigate(NavigateParams* params) { |
391 Browser* source_browser = params->browser; | 391 Browser* source_browser = params->browser; |
392 if (source_browser) | 392 if (source_browser) |
393 params->initiating_profile = source_browser->profile(); | 393 params->initiating_profile = source_browser->profile(); |
394 DCHECK(params->initiating_profile); | 394 DCHECK(params->initiating_profile); |
395 | 395 |
396 if (!AdjustNavigateParamsForURL(params)) | 396 if (!AdjustNavigateParamsForURL(params)) |
397 return; | 397 return; |
398 | 398 |
| 399 ExtensionService* service = params->initiating_profile->GetExtensionService(); |
| 400 if (service) |
| 401 service->ShouldBlockUrlInBrowserTab(¶ms->url); |
| 402 |
399 // The browser window may want to adjust the disposition. | 403 // The browser window may want to adjust the disposition. |
400 if (params->disposition == NEW_POPUP && | 404 if (params->disposition == NEW_POPUP && |
401 source_browser && | 405 source_browser && |
402 source_browser->window()) { | 406 source_browser->window()) { |
403 params->disposition = | 407 params->disposition = |
404 source_browser->window()->GetDispositionForPopupBounds( | 408 source_browser->window()->GetDispositionForPopupBounds( |
405 params->window_bounds); | 409 params->window_bounds); |
406 } | 410 } |
407 | 411 |
408 params->browser = GetBrowserForDisposition(params); | 412 params->browser = GetBrowserForDisposition(params); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 return !(url.scheme() == chrome::kChromeUIScheme && | 599 return !(url.scheme() == chrome::kChromeUIScheme && |
596 (url.host() == chrome::kChromeUISettingsHost || | 600 (url.host() == chrome::kChromeUISettingsHost || |
597 url.host() == chrome::kChromeUISettingsFrameHost || | 601 url.host() == chrome::kChromeUISettingsFrameHost || |
598 url.host() == chrome::kChromeUIExtensionsHost || | 602 url.host() == chrome::kChromeUIExtensionsHost || |
599 url.host() == chrome::kChromeUIBookmarksHost || | 603 url.host() == chrome::kChromeUIBookmarksHost || |
600 url.host() == chrome::kChromeUISyncPromoHost || | 604 url.host() == chrome::kChromeUISyncPromoHost || |
601 url.host() == chrome::kChromeUIUberHost)); | 605 url.host() == chrome::kChromeUIUberHost)); |
602 } | 606 } |
603 | 607 |
604 } // namespace chrome | 608 } // namespace chrome |
OLD | NEW |