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 if (event.windowsKeyCode == 27 && tab_caused_fullscreen_) { |
| 3705 ExitTabbedFullscreenModeIfNecessary(); |
| 3706 return true; |
| 3707 } |
3703 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); | 3708 return window()->PreHandleKeyboardEvent(event, is_keyboard_shortcut); |
3704 } | 3709 } |
3705 | 3710 |
3706 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 3711 void Browser::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
3707 window()->HandleKeyboardEvent(event); | 3712 window()->HandleKeyboardEvent(event); |
3708 } | 3713 } |
3709 | 3714 |
3710 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { | 3715 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { |
3711 window()->ShowRepostFormWarningDialog(tab_contents); | 3716 window()->ShowRepostFormWarningDialog(tab_contents); |
3712 } | 3717 } |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5306 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5311 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5307 } else if (is_type_tabbed()) { | 5312 } else if (is_type_tabbed()) { |
5308 GlobalErrorService* service = | 5313 GlobalErrorService* service = |
5309 GlobalErrorServiceFactory::GetForProfile(profile()); | 5314 GlobalErrorServiceFactory::GetForProfile(profile()); |
5310 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5315 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5311 if (error) { | 5316 if (error) { |
5312 error->ShowBubbleView(this); | 5317 error->ShowBubbleView(this); |
5313 } | 5318 } |
5314 } | 5319 } |
5315 } | 5320 } |
OLD | NEW |