Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: chrome/browser/ui/fullscreen/fullscreen_exit_bubble.cc

Issue 10700071: browser: Remove fullscreen functions and have callers call FullscreenController directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "chrome/browser/ui/browser_commands.h" 11 #include "chrome/browser/ui/browser_commands.h"
12 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
12 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
13 #include "grit/ui_strings.h" 14 #include "grit/ui_strings.h"
14 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
15 #include "ui/gfx/rect.h" 16 #include "ui/gfx/rect.h"
16 17
17 // NOTE(koz): Linux doesn't use the thick shadowed border, so we add padding 18 // NOTE(koz): Linux doesn't use the thick shadowed border, so we add padding
18 // here. 19 // here.
19 #ifdef LINUX 20 #ifdef LINUX
20 const int FullscreenExitBubble::kPaddingPx = 8; 21 const int FullscreenExitBubble::kPaddingPx = 8;
21 #else 22 #else
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // the neutral region and we're sliding out. 107 // the neutral region and we're sliding out.
107 Show(); 108 Show();
108 } 109 }
109 } 110 }
110 111
111 void FullscreenExitBubble::ToggleFullscreen() { 112 void FullscreenExitBubble::ToggleFullscreen() {
112 chrome::ExecuteCommand(browser_, IDC_FULLSCREEN); 113 chrome::ExecuteCommand(browser_, IDC_FULLSCREEN);
113 } 114 }
114 115
115 void FullscreenExitBubble::Accept() { 116 void FullscreenExitBubble::Accept() {
116 browser_->OnAcceptFullscreenPermission(url_, bubble_type_); 117 browser_->fullscreen_controller()->OnAcceptFullscreenPermission(url_,
118 bubble_type_);
117 } 119 }
118 120
119 void FullscreenExitBubble::Cancel() { 121 void FullscreenExitBubble::Cancel() {
120 browser_->OnDenyFullscreenPermission(bubble_type_); 122 browser_->fullscreen_controller()->OnDenyFullscreenPermission(bubble_type_);
121 } 123 }
122 124
123 string16 FullscreenExitBubble::GetCurrentMessageText() const { 125 string16 FullscreenExitBubble::GetCurrentMessageText() const {
124 return fullscreen_bubble::GetLabelTextForType( 126 return fullscreen_bubble::GetLabelTextForType(
125 bubble_type_, url_, browser_->profile()->GetExtensionService()); 127 bubble_type_, url_, browser_->profile()->GetExtensionService());
126 } 128 }
127 129
128 string16 FullscreenExitBubble::GetCurrentDenyButtonText() const { 130 string16 FullscreenExitBubble::GetCurrentDenyButtonText() const {
129 return fullscreen_bubble::GetDenyButtonTextForType(bubble_type_); 131 return fullscreen_bubble::GetDenyButtonTextForType(bubble_type_);
130 } 132 }
131 133
132 string16 FullscreenExitBubble::GetAllowButtonText() const { 134 string16 FullscreenExitBubble::GetAllowButtonText() const {
133 return l10n_util::GetStringUTF16(IDS_FULLSCREEN_ALLOW); 135 return l10n_util::GetStringUTF16(IDS_FULLSCREEN_ALLOW);
134 } 136 }
135 137
136 string16 FullscreenExitBubble::GetInstructionText() const { 138 string16 FullscreenExitBubble::GetInstructionText() const {
137 return l10n_util::GetStringFUTF16(IDS_FULLSCREEN_PRESS_ESC_TO_EXIT, 139 return l10n_util::GetStringFUTF16(IDS_FULLSCREEN_PRESS_ESC_TO_EXIT,
138 l10n_util::GetStringUTF16(IDS_APP_ESC_KEY)); 140 l10n_util::GetStringUTF16(IDS_APP_ESC_KEY));
139 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fullscreen/fullscreen_controller_test.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698