| 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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/app/chrome_command_ids.h" | 29 #include "chrome/app/chrome_command_ids.h" |
| 30 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 30 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 31 #include "chrome/browser/background/background_contents_service.h" | 31 #include "chrome/browser/background/background_contents_service.h" |
| 32 #include "chrome/browser/background/background_contents_service_factory.h" | 32 #include "chrome/browser/background/background_contents_service_factory.h" |
| 33 #include "chrome/browser/bookmarks/bookmark_model.h" | 33 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 34 #include "chrome/browser/bookmarks/bookmark_utils.h" | 34 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 35 #include "chrome/browser/browser_process.h" | 35 #include "chrome/browser/browser_process.h" |
| 36 #include "chrome/browser/browser_shutdown.h" | 36 #include "chrome/browser/browser_shutdown.h" |
| 37 #include "chrome/browser/character_encoding.h" | 37 #include "chrome/browser/character_encoding.h" |
| 38 #include "chrome/browser/chrome_page_zoom.h" | 38 #include "chrome/browser/chrome_page_zoom.h" |
| 39 #include "chrome/browser/color_select_helper.h" |
| 39 #include "chrome/browser/content_settings/host_content_settings_map.h" | 40 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 40 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 41 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 41 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" | 42 #include "chrome/browser/custom_handlers/register_protocol_handler_infobar_deleg
ate.h" |
| 42 #include "chrome/browser/debugger/devtools_toggle_action.h" | 43 #include "chrome/browser/debugger/devtools_toggle_action.h" |
| 43 #include "chrome/browser/debugger/devtools_window.h" | 44 #include "chrome/browser/debugger/devtools_window.h" |
| 44 #include "chrome/browser/download/chrome_download_manager_delegate.h" | 45 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
| 45 #include "chrome/browser/download/download_item_model.h" | 46 #include "chrome/browser/download/download_item_model.h" |
| 46 #include "chrome/browser/download/download_service.h" | 47 #include "chrome/browser/download/download_service.h" |
| 47 #include "chrome/browser/download/download_service_factory.h" | 48 #include "chrome/browser/download/download_service_factory.h" |
| 48 #include "chrome/browser/download/download_started_animation.h" | 49 #include "chrome/browser/download/download_started_animation.h" |
| (...skipping 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4003 | 4004 |
| 4004 void Browser::DidNavigateToPendingEntry(WebContents* tab) { | 4005 void Browser::DidNavigateToPendingEntry(WebContents* tab) { |
| 4005 if (tab == GetSelectedWebContents()) | 4006 if (tab == GetSelectedWebContents()) |
| 4006 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); | 4007 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); |
| 4007 } | 4008 } |
| 4008 | 4009 |
| 4009 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { | 4010 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { |
| 4010 return GetJavaScriptDialogCreatorInstance(); | 4011 return GetJavaScriptDialogCreatorInstance(); |
| 4011 } | 4012 } |
| 4012 | 4013 |
| 4014 void Browser::OpenColorChooser(WebContents* tab, |
| 4015 const WebKit::WebColor& color) { |
| 4016 color_select_helper_.reset(new ColorSelectHelper()); |
| 4017 color_select_helper_->OpenColorChooser(tab, color); |
| 4018 } |
| 4019 void Browser::EndColorChooser(WebContents* tab) { |
| 4020 color_select_helper_->EndColorChooser(tab); |
| 4021 } |
| 4022 void Browser::SetSelectedColorInColorChooser(WebContents* tab, |
| 4023 const WebKit::WebColor& color) { |
| 4024 color_select_helper_->SetSelectedColorInColorChooser(tab, color); |
| 4025 } |
| 4026 |
| 4013 void Browser::RunFileChooser(WebContents* tab, | 4027 void Browser::RunFileChooser(WebContents* tab, |
| 4014 const content::FileChooserParams& params) { | 4028 const content::FileChooserParams& params) { |
| 4015 RunFileChooserHelper(tab, params); | 4029 RunFileChooserHelper(tab, params); |
| 4016 } | 4030 } |
| 4017 | 4031 |
| 4018 void Browser::EnumerateDirectory(WebContents* tab, int request_id, | 4032 void Browser::EnumerateDirectory(WebContents* tab, int request_id, |
| 4019 const FilePath& path) { | 4033 const FilePath& path) { |
| 4020 EnumerateDirectoryHelper(tab, request_id, path); | 4034 EnumerateDirectoryHelper(tab, request_id, path); |
| 4021 } | 4035 } |
| 4022 | 4036 |
| (...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5500 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); | 5514 local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false); |
| 5501 window_->GetLocationBar()->ShowFirstRunBubble(); | 5515 window_->GetLocationBar()->ShowFirstRunBubble(); |
| 5502 } else { | 5516 } else { |
| 5503 GlobalErrorService* service = | 5517 GlobalErrorService* service = |
| 5504 GlobalErrorServiceFactory::GetForProfile(profile()); | 5518 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5505 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5519 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5506 if (error) | 5520 if (error) |
| 5507 error->ShowBubbleView(this); | 5521 error->ShowBubbleView(this); |
| 5508 } | 5522 } |
| 5509 } | 5523 } |
| OLD | NEW |