| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #include "chrome/browser/platform_util.h" | 70 #include "chrome/browser/platform_util.h" |
| 71 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 71 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 72 #include "chrome/browser/prefs/pref_service.h" | 72 #include "chrome/browser/prefs/pref_service.h" |
| 73 #include "chrome/browser/prerender/prerender_tab_helper.h" | 73 #include "chrome/browser/prerender/prerender_tab_helper.h" |
| 74 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" | 74 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" |
| 75 #include "chrome/browser/printing/print_preview_tab_controller.h" | 75 #include "chrome/browser/printing/print_preview_tab_controller.h" |
| 76 #include "chrome/browser/printing/print_view_manager.h" | 76 #include "chrome/browser/printing/print_view_manager.h" |
| 77 #include "chrome/browser/profiles/profile.h" | 77 #include "chrome/browser/profiles/profile.h" |
| 78 #include "chrome/browser/profiles/profile_manager.h" | 78 #include "chrome/browser/profiles/profile_manager.h" |
| 79 #include "chrome/browser/profiles/profile_metrics.h" | 79 #include "chrome/browser/profiles/profile_metrics.h" |
| 80 #include "chrome/browser/repost_form_warning_controller.h" |
| 80 #include "chrome/browser/sessions/restore_tab_helper.h" | 81 #include "chrome/browser/sessions/restore_tab_helper.h" |
| 81 #include "chrome/browser/sessions/session_service.h" | 82 #include "chrome/browser/sessions/session_service.h" |
| 82 #include "chrome/browser/sessions/session_service_factory.h" | 83 #include "chrome/browser/sessions/session_service_factory.h" |
| 83 #include "chrome/browser/sessions/session_types.h" | 84 #include "chrome/browser/sessions/session_types.h" |
| 84 #include "chrome/browser/sessions/tab_restore_service.h" | 85 #include "chrome/browser/sessions/tab_restore_service.h" |
| 85 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 86 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 86 #include "chrome/browser/sync/profile_sync_service.h" | 87 #include "chrome/browser/sync/profile_sync_service.h" |
| 87 #include "chrome/browser/sync/sync_ui_util.h" | 88 #include "chrome/browser/sync/sync_ui_util.h" |
| 88 #include "chrome/browser/tab_closeable_state_watcher.h" | 89 #include "chrome/browser/tab_closeable_state_watcher.h" |
| 89 #include "chrome/browser/tab_contents/background_contents.h" | 90 #include "chrome/browser/tab_contents/background_contents.h" |
| (...skipping 3698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3788 return true; | 3789 return true; |
| 3789 } | 3790 } |
| 3790 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); | 3791 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); |
| 3791 } | 3792 } |
| 3792 | 3793 |
| 3793 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 3794 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
| 3794 window()->HandleKeyboardEvent(event); | 3795 window()->HandleKeyboardEvent(event); |
| 3795 } | 3796 } |
| 3796 | 3797 |
| 3797 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { | 3798 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { |
| 3798 window()->ShowRepostFormWarningDialog(tab_contents); | 3799 browser::ShowTabModalConfirmDialog( |
| 3800 new RepostFormWarningController(tab_contents), |
| 3801 TabContentsWrapper::GetCurrentWrapperForContents(tab_contents)); |
| 3799 } | 3802 } |
| 3800 | 3803 |
| 3801 void Browser::ShowContentSettingsPage(ContentSettingsType content_type) { | 3804 void Browser::ShowContentSettingsPage(ContentSettingsType content_type) { |
| 3802 ShowOptionsTab( | 3805 ShowOptionsTab( |
| 3803 chrome::kContentSettingsExceptionsSubPage + std::string(kHashMark) + | 3806 chrome::kContentSettingsExceptionsSubPage + std::string(kHashMark) + |
| 3804 ContentSettingsHandler::ContentSettingsTypeToGroupName(content_type)); | 3807 ContentSettingsHandler::ContentSettingsTypeToGroupName(content_type)); |
| 3805 } | 3808 } |
| 3806 | 3809 |
| 3807 void Browser::ShowCollectedCookiesDialog(TabContentsWrapper* wrapper) { | 3810 void Browser::ShowCollectedCookiesDialog(TabContentsWrapper* wrapper) { |
| 3808 window()->ShowCollectedCookiesDialog(wrapper); | 3811 window()->ShowCollectedCookiesDialog(wrapper); |
| (...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5345 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5348 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
| 5346 } else { | 5349 } else { |
| 5347 GlobalErrorService* service = | 5350 GlobalErrorService* service = |
| 5348 GlobalErrorServiceFactory::GetForProfile(profile()); | 5351 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5349 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5352 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5350 if (error) { | 5353 if (error) { |
| 5351 error->ShowBubbleView(this); | 5354 error->ShowBubbleView(this); |
| 5352 } | 5355 } |
| 5353 } | 5356 } |
| 5354 } | 5357 } |
| OLD | NEW |