| 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/fullscreen/fullscreen_exit_bubble.h" | 5 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // the neutral region and we're sliding out. | 106 // the neutral region and we're sliding out. |
| 107 Show(); | 107 Show(); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 void FullscreenExitBubble::ToggleFullscreen() { | 111 void FullscreenExitBubble::ToggleFullscreen() { |
| 112 chrome::ExecuteCommand(browser_, IDC_FULLSCREEN); | 112 chrome::ExecuteCommand(browser_, IDC_FULLSCREEN); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void FullscreenExitBubble::Accept() { | 115 void FullscreenExitBubble::Accept() { |
| 116 browser_->OnAcceptFullscreenPermission(url_, bubble_type_); | 116 browser_->fullscreen_controller()->OnAcceptFullscreenPermission(url_, |
| 117 bubble_type_); |
| 117 } | 118 } |
| 118 | 119 |
| 119 void FullscreenExitBubble::Cancel() { | 120 void FullscreenExitBubble::Cancel() { |
| 120 browser_->OnDenyFullscreenPermission(bubble_type_); | 121 browser_->fullscreen_controller()->OnDenyFullscreenPermission(bubble_type_); |
| 121 } | 122 } |
| 122 | 123 |
| 123 string16 FullscreenExitBubble::GetCurrentMessageText() const { | 124 string16 FullscreenExitBubble::GetCurrentMessageText() const { |
| 124 return fullscreen_bubble::GetLabelTextForType( | 125 return fullscreen_bubble::GetLabelTextForType( |
| 125 bubble_type_, url_, browser_->profile()->GetExtensionService()); | 126 bubble_type_, url_, browser_->profile()->GetExtensionService()); |
| 126 } | 127 } |
| 127 | 128 |
| 128 string16 FullscreenExitBubble::GetCurrentDenyButtonText() const { | 129 string16 FullscreenExitBubble::GetCurrentDenyButtonText() const { |
| 129 return fullscreen_bubble::GetDenyButtonTextForType(bubble_type_); | 130 return fullscreen_bubble::GetDenyButtonTextForType(bubble_type_); |
| 130 } | 131 } |
| 131 | 132 |
| 132 string16 FullscreenExitBubble::GetAllowButtonText() const { | 133 string16 FullscreenExitBubble::GetAllowButtonText() const { |
| 133 return l10n_util::GetStringUTF16(IDS_FULLSCREEN_ALLOW); | 134 return l10n_util::GetStringUTF16(IDS_FULLSCREEN_ALLOW); |
| 134 } | 135 } |
| 135 | 136 |
| 136 string16 FullscreenExitBubble::GetInstructionText() const { | 137 string16 FullscreenExitBubble::GetInstructionText() const { |
| 137 return l10n_util::GetStringFUTF16(IDS_FULLSCREEN_PRESS_ESC_TO_EXIT, | 138 return l10n_util::GetStringFUTF16(IDS_FULLSCREEN_PRESS_ESC_TO_EXIT, |
| 138 l10n_util::GetStringUTF16(IDS_APP_ESC_KEY)); | 139 l10n_util::GetStringUTF16(IDS_APP_ESC_KEY)); |
| 139 } | 140 } |
| OLD | NEW |