Chromium Code Reviews| 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.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 // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 #include "chrome/browser/themes/theme_service.h" | 101 #include "chrome/browser/themes/theme_service.h" |
| 102 #include "chrome/browser/themes/theme_service_factory.h" | 102 #include "chrome/browser/themes/theme_service_factory.h" |
| 103 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" | 103 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" |
| 104 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 104 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
| 105 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 105 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| 106 #include "chrome/browser/ui/browser_dialogs.h" | 106 #include "chrome/browser/ui/browser_dialogs.h" |
| 107 #include "chrome/browser/ui/browser_list.h" | 107 #include "chrome/browser/ui/browser_list.h" |
| 108 #include "chrome/browser/ui/browser_navigator.h" | 108 #include "chrome/browser/ui/browser_navigator.h" |
| 109 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" | 109 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
| 110 #include "chrome/browser/ui/browser_window.h" | 110 #include "chrome/browser/ui/browser_window.h" |
| 111 #include "chrome/browser/ui/color_chooser.h" | |
| 111 #include "chrome/browser/ui/constrained_window_tab_helper.h" | 112 #include "chrome/browser/ui/constrained_window_tab_helper.h" |
| 112 #include "chrome/browser/ui/extensions/shell_window.h" | 113 #include "chrome/browser/ui/extensions/shell_window.h" |
| 113 #include "chrome/browser/ui/find_bar/find_bar.h" | 114 #include "chrome/browser/ui/find_bar/find_bar.h" |
| 114 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 115 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 115 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 116 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 116 #include "chrome/browser/ui/fullscreen_controller.h" | 117 #include "chrome/browser/ui/fullscreen_controller.h" |
| 117 #include "chrome/browser/ui/global_error.h" | 118 #include "chrome/browser/ui/global_error.h" |
| 118 #include "chrome/browser/ui/global_error_service.h" | 119 #include "chrome/browser/ui/global_error_service.h" |
| 119 #include "chrome/browser/ui/global_error_service_factory.h" | 120 #include "chrome/browser/ui/global_error_service_factory.h" |
| 120 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" | 121 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 143 #include "chrome/common/chrome_switches.h" | 144 #include "chrome/common/chrome_switches.h" |
| 144 #include "chrome/common/custom_handlers/protocol_handler.h" | 145 #include "chrome/common/custom_handlers/protocol_handler.h" |
| 145 #include "chrome/common/extensions/extension.h" | 146 #include "chrome/common/extensions/extension.h" |
| 146 #include "chrome/common/extensions/extension_constants.h" | 147 #include "chrome/common/extensions/extension_constants.h" |
| 147 #include "chrome/common/pref_names.h" | 148 #include "chrome/common/pref_names.h" |
| 148 #include "chrome/common/profiling.h" | 149 #include "chrome/common/profiling.h" |
| 149 #include "chrome/common/url_constants.h" | 150 #include "chrome/common/url_constants.h" |
| 150 #include "chrome/common/web_apps.h" | 151 #include "chrome/common/web_apps.h" |
| 151 #include "content/browser/browser_url_handler.h" | 152 #include "content/browser/browser_url_handler.h" |
| 152 #include "content/browser/renderer_host/render_view_host.h" | 153 #include "content/browser/renderer_host/render_view_host.h" |
| 154 #include "content/public/browser/color_chooser.h" | |
| 153 #include "content/public/browser/devtools_manager.h" | 155 #include "content/public/browser/devtools_manager.h" |
| 154 #include "content/public/browser/download_item.h" | 156 #include "content/public/browser/download_item.h" |
| 155 #include "content/public/browser/download_manager.h" | 157 #include "content/public/browser/download_manager.h" |
| 156 #include "content/public/browser/interstitial_page.h" | 158 #include "content/public/browser/interstitial_page.h" |
| 157 #include "content/public/browser/invalidate_type.h" | 159 #include "content/public/browser/invalidate_type.h" |
| 158 #include "content/public/browser/navigation_controller.h" | 160 #include "content/public/browser/navigation_controller.h" |
| 159 #include "content/public/browser/navigation_entry.h" | 161 #include "content/public/browser/navigation_entry.h" |
| 160 #include "content/public/browser/notification_details.h" | 162 #include "content/public/browser/notification_details.h" |
| 161 #include "content/public/browser/notification_service.h" | 163 #include "content/public/browser/notification_service.h" |
| 162 #include "content/public/browser/plugin_service.h" | 164 #include "content/public/browser/plugin_service.h" |
| (...skipping 3948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4111 | 4113 |
| 4112 void Browser::DidNavigateToPendingEntry(WebContents* tab) { | 4114 void Browser::DidNavigateToPendingEntry(WebContents* tab) { |
| 4113 if (tab == GetSelectedWebContents()) | 4115 if (tab == GetSelectedWebContents()) |
| 4114 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); | 4116 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); |
| 4115 } | 4117 } |
| 4116 | 4118 |
| 4117 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { | 4119 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { |
| 4118 return GetJavaScriptDialogCreatorInstance(); | 4120 return GetJavaScriptDialogCreatorInstance(); |
| 4119 } | 4121 } |
| 4120 | 4122 |
| 4123 content::ColorChooser* Browser::OpenColorChooser(WebContents* tab, | |
| 4124 int color_chooser_id, | |
| 4125 const SkColor& color) { | |
| 4126 if (color_chooser_.get()) | |
| 4127 color_chooser_->End(); | |
| 4128 color_chooser_.reset(ColorChooser::Create(color_chooser_id, | |
| 4129 tab, | |
|
Peter Kasting
2012/02/29 01:40:07
Nit: Go ahead and put this arg on the previous lin
keishi
2012/02/29 13:05:22
Done.
| |
| 4130 color)); | |
| 4131 return static_cast<content::ColorChooser*>(color_chooser_.get()); | |
|
Peter Kasting
2012/02/29 01:40:07
Nit: Make |color_chooser_| be of this type so you
keishi
2012/02/29 13:05:22
Done.
| |
| 4132 } | |
| 4133 | |
| 4134 void Browser::DidEndColorChooser() { | |
| 4135 color_chooser_.reset(); | |
| 4136 } | |
| 4137 | |
| 4121 void Browser::RunFileChooser(WebContents* tab, | 4138 void Browser::RunFileChooser(WebContents* tab, |
| 4122 const content::FileChooserParams& params) { | 4139 const content::FileChooserParams& params) { |
| 4123 RunFileChooserHelper(tab, params); | 4140 RunFileChooserHelper(tab, params); |
| 4124 } | 4141 } |
| 4125 | 4142 |
| 4126 void Browser::EnumerateDirectory(WebContents* tab, int request_id, | 4143 void Browser::EnumerateDirectory(WebContents* tab, int request_id, |
| 4127 const FilePath& path) { | 4144 const FilePath& path) { |
| 4128 EnumerateDirectoryHelper(tab, request_id, path); | 4145 EnumerateDirectoryHelper(tab, request_id, path); |
| 4129 } | 4146 } |
| 4130 | 4147 |
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5584 ShowSingletonTabOverwritingNTP(params); | 5601 ShowSingletonTabOverwritingNTP(params); |
| 5585 } else { | 5602 } else { |
| 5586 LoginUIServiceFactory::GetForProfile( | 5603 LoginUIServiceFactory::GetForProfile( |
| 5587 profile()->GetOriginalProfile())->ShowLoginUI(); | 5604 profile()->GetOriginalProfile())->ShowLoginUI(); |
| 5588 } | 5605 } |
| 5589 } | 5606 } |
| 5590 | 5607 |
| 5591 void Browser::ToggleSpeechInput() { | 5608 void Browser::ToggleSpeechInput() { |
| 5592 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5609 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
| 5593 } | 5610 } |
| OLD | NEW |