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 3682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3693 const GURL& frame_url, | 3693 const GURL& frame_url, |
3694 const std::string& frame_content_state) { | 3694 const std::string& frame_content_state) { |
3695 DCHECK(source); | 3695 DCHECK(source); |
3696 int index = tabstrip_model()->GetWrapperIndex(source); | 3696 int index = tabstrip_model()->GetWrapperIndex(source); |
3697 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index); | 3697 TabContentsWrapper* wrapper = tabstrip_model()->GetTabContentsAt(index); |
3698 ViewSource(wrapper, frame_url, frame_content_state); | 3698 ViewSource(wrapper, frame_url, frame_content_state); |
3699 } | 3699 } |
3700 | 3700 |
3701 bool Browser::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 3701 bool Browser::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
3702 bool* is_keyboard_shortcut) { | 3702 bool* is_keyboard_shortcut) { |
| 3703 // Escape exits tabbed fullscreen mode. |
| 3704 // TODO(koz): Write a test for this http://crbug.com/100441. |
| 3705 if (event.windowsKeyCode == 27 && fullscreened_tab_) { |
| 3706 ExitTabbedFullscreenModeIfNecessary(); |
| 3707 return true; |
| 3708 } |
3703 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); | 3709 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); |
3704 } | 3710 } |
3705 | 3711 |
3706 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 3712 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
3707 window()->HandleKeyboardEvent(event); | 3713 window()->HandleKeyboardEvent(event); |
3708 } | 3714 } |
3709 | 3715 |
3710 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { | 3716 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { |
3711 window()->ShowRepostFormWarningDialog(tab_contents); | 3717 window()->ShowRepostFormWarningDialog(tab_contents); |
3712 } | 3718 } |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5306 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5312 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5307 } else if (is_type_tabbed()) { | 5313 } else if (is_type_tabbed()) { |
5308 GlobalErrorService* service = | 5314 GlobalErrorService* service = |
5309 GlobalErrorServiceFactory::GetForProfile(profile()); | 5315 GlobalErrorServiceFactory::GetForProfile(profile()); |
5310 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5316 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5311 if (error) { | 5317 if (error) { |
5312 error->ShowBubbleView(this); | 5318 error->ShowBubbleView(this); |
5313 } | 5319 } |
5314 } | 5320 } |
5315 } | 5321 } |
OLD | NEW |