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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 386 |
387 void Navigate(NavigateParams* params) { | 387 void Navigate(NavigateParams* params) { |
388 Browser* source_browser = params->browser; | 388 Browser* source_browser = params->browser; |
389 if (source_browser) | 389 if (source_browser) |
390 params->initiating_profile = source_browser->profile(); | 390 params->initiating_profile = source_browser->profile(); |
391 DCHECK(params->initiating_profile); | 391 DCHECK(params->initiating_profile); |
392 | 392 |
393 if (!AdjustNavigateParamsForURL(params)) | 393 if (!AdjustNavigateParamsForURL(params)) |
394 return; | 394 return; |
395 | 395 |
| 396 ExtensionService* service = params->initiating_profile->GetExtensionService(); |
| 397 if (service) |
| 398 service->ShouldBlockUrlInBrowserTab(¶ms->url); |
| 399 |
396 // The browser window may want to adjust the disposition. | 400 // The browser window may want to adjust the disposition. |
397 if (params->disposition == NEW_POPUP && | 401 if (params->disposition == NEW_POPUP && |
398 source_browser && | 402 source_browser && |
399 source_browser->window()) { | 403 source_browser->window()) { |
400 params->disposition = | 404 params->disposition = |
401 source_browser->window()->GetDispositionForPopupBounds( | 405 source_browser->window()->GetDispositionForPopupBounds( |
402 params->window_bounds); | 406 params->window_bounds); |
403 } | 407 } |
404 | 408 |
405 // Adjust disposition for the navigation happending in the sad page of the | 409 // Adjust disposition for the navigation happending in the sad page of the |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 return !(url.scheme() == chrome::kChromeUIScheme && | 605 return !(url.scheme() == chrome::kChromeUIScheme && |
602 (url.host() == chrome::kChromeUISettingsHost || | 606 (url.host() == chrome::kChromeUISettingsHost || |
603 url.host() == chrome::kChromeUISettingsFrameHost || | 607 url.host() == chrome::kChromeUISettingsFrameHost || |
604 url.host() == chrome::kChromeUIExtensionsHost || | 608 url.host() == chrome::kChromeUIExtensionsHost || |
605 url.host() == chrome::kChromeUIBookmarksHost || | 609 url.host() == chrome::kChromeUIBookmarksHost || |
606 url.host() == chrome::kChromeUISyncPromoHost || | 610 url.host() == chrome::kChromeUISyncPromoHost || |
607 url.host() == chrome::kChromeUIUberHost)); | 611 url.host() == chrome::kChromeUIUberHost)); |
608 } | 612 } |
609 | 613 |
610 } // namespace chrome | 614 } // namespace chrome |
OLD | NEW |