OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 #include "chrome/browser/sessions/tab_restore_service.h" | 81 #include "chrome/browser/sessions/tab_restore_service.h" |
82 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 82 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
83 #include "chrome/browser/sync/profile_sync_service.h" | 83 #include "chrome/browser/sync/profile_sync_service.h" |
84 #include "chrome/browser/sync/profile_sync_service_factory.h" | 84 #include "chrome/browser/sync/profile_sync_service_factory.h" |
85 #include "chrome/browser/sync/sync_ui_util.h" | 85 #include "chrome/browser/sync/sync_ui_util.h" |
86 #include "chrome/browser/tab_contents/background_contents.h" | 86 #include "chrome/browser/tab_contents/background_contents.h" |
87 #include "chrome/browser/tab_contents/retargeting_details.h" | 87 #include "chrome/browser/tab_contents/retargeting_details.h" |
88 #include "chrome/browser/tab_contents/tab_util.h" | 88 #include "chrome/browser/tab_contents/tab_util.h" |
89 #include "chrome/browser/themes/theme_service.h" | 89 #include "chrome/browser/themes/theme_service.h" |
90 #include "chrome/browser/themes/theme_service_factory.h" | 90 #include "chrome/browser/themes/theme_service_factory.h" |
91 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h" | 91 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_manager.h" |
92 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 92 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
93 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 93 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
94 #include "chrome/browser/ui/browser_command_controller.h" | 94 #include "chrome/browser/ui/browser_command_controller.h" |
95 #include "chrome/browser/ui/browser_commands.h" | 95 #include "chrome/browser/ui/browser_commands.h" |
96 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | 96 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" |
97 #include "chrome/browser/ui/browser_dialogs.h" | 97 #include "chrome/browser/ui/browser_dialogs.h" |
98 #include "chrome/browser/ui/browser_finder.h" | 98 #include "chrome/browser/ui/browser_finder.h" |
99 #include "chrome/browser/ui/browser_instant_controller.h" | 99 #include "chrome/browser/ui/browser_instant_controller.h" |
100 #include "chrome/browser/ui/browser_iterator.h" | 100 #include "chrome/browser/ui/browser_iterator.h" |
101 #include "chrome/browser/ui/browser_list.h" | 101 #include "chrome/browser/ui/browser_list.h" |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1520 void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) { | 1520 void Browser::DidNavigateMainFramePostCommit(WebContents* web_contents) { |
1521 if (web_contents == tab_strip_model_->GetActiveWebContents()) | 1521 if (web_contents == tab_strip_model_->GetActiveWebContents()) |
1522 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); | 1522 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); |
1523 } | 1523 } |
1524 | 1524 |
1525 void Browser::DidNavigateToPendingEntry(WebContents* web_contents) { | 1525 void Browser::DidNavigateToPendingEntry(WebContents* web_contents) { |
1526 if (web_contents == tab_strip_model_->GetActiveWebContents()) | 1526 if (web_contents == tab_strip_model_->GetActiveWebContents()) |
1527 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); | 1527 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); |
1528 } | 1528 } |
1529 | 1529 |
1530 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { | 1530 content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager() { |
1531 return GetJavaScriptDialogCreatorInstance(); | 1531 return GetJavaScriptDialogManagerInstance(); |
1532 } | 1532 } |
1533 | 1533 |
1534 content::ColorChooser* Browser::OpenColorChooser(WebContents* web_contents, | 1534 content::ColorChooser* Browser::OpenColorChooser(WebContents* web_contents, |
1535 int color_chooser_id, | 1535 int color_chooser_id, |
1536 SkColor color) { | 1536 SkColor color) { |
1537 #if defined(OS_WIN) | 1537 #if defined(OS_WIN) |
1538 // On Windows, only create a color chooser if one doesn't exist, because we | 1538 // On Windows, only create a color chooser if one doesn't exist, because we |
1539 // can't close the old color chooser dialog. | 1539 // can't close the old color chooser dialog. |
1540 if (!color_chooser_.get()) | 1540 if (!color_chooser_.get()) |
1541 color_chooser_.reset(content::ColorChooser::Create(color_chooser_id, | 1541 color_chooser_.reset(content::ColorChooser::Create(color_chooser_id, |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2334 if (contents && !allow_js_access) { | 2334 if (contents && !allow_js_access) { |
2335 contents->web_contents()->GetController().LoadURL( | 2335 contents->web_contents()->GetController().LoadURL( |
2336 target_url, | 2336 target_url, |
2337 content::Referrer(), | 2337 content::Referrer(), |
2338 content::PAGE_TRANSITION_LINK, | 2338 content::PAGE_TRANSITION_LINK, |
2339 std::string()); // No extra headers. | 2339 std::string()); // No extra headers. |
2340 } | 2340 } |
2341 | 2341 |
2342 return contents != NULL; | 2342 return contents != NULL; |
2343 } | 2343 } |
OLD | NEW |