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

Side by Side Diff: chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc

Issue 1972543002: Fullscreen / mouselock bubble: Use new theming even when flag disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen-remove-permission
Patch Set: Respond to review. Created 4 years, 7 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
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/exclusive_access/exclusive_access_bubble.h" 5 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 base::string16 ExclusiveAccessBubble::GetCurrentDenyButtonText() const { 174 base::string16 ExclusiveAccessBubble::GetCurrentDenyButtonText() const {
175 return exclusive_access_bubble::GetDenyButtonTextForType(bubble_type_); 175 return exclusive_access_bubble::GetDenyButtonTextForType(bubble_type_);
176 } 176 }
177 177
178 base::string16 ExclusiveAccessBubble::GetCurrentAllowButtonText() const { 178 base::string16 ExclusiveAccessBubble::GetCurrentAllowButtonText() const {
179 return exclusive_access_bubble::GetAllowButtonTextForType(bubble_type_, url_); 179 return exclusive_access_bubble::GetAllowButtonTextForType(bubble_type_, url_);
180 } 180 }
181 181
182 base::string16 ExclusiveAccessBubble::GetInstructionText( 182 base::string16 ExclusiveAccessBubble::GetInstructionText(
183 const base::string16& accelerator) const { 183 const base::string16& accelerator) const {
184 #if defined(OS_MACOSX)
185 // On Mac, if simplified-fullscreen is disabled, the Cocoa code is unable to
186 // deal with the special formatting returned by GetInstructionTextForType, so
187 // just return the old string.
184 if (!ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled()) { 188 if (!ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled()) {
185 return l10n_util::GetStringFUTF16(IDS_FULLSCREEN_PRESS_ESC_TO_EXIT_SENTENCE, 189 return l10n_util::GetStringFUTF16(IDS_FULLSCREEN_PRESS_ESC_TO_EXIT_SENTENCE,
186 accelerator); 190 accelerator);
187 } 191 }
192 #endif
188 193
189 return exclusive_access_bubble::GetInstructionTextForType(bubble_type_, 194 return exclusive_access_bubble::GetInstructionTextForType(bubble_type_,
190 accelerator); 195 accelerator);
191 } 196 }
192 197
193 void ExclusiveAccessBubble::ShowAndStartTimers() { 198 void ExclusiveAccessBubble::ShowAndStartTimers() {
194 Show(); 199 Show();
195 200
196 // Do not allow the notification to hide for a few seconds. 201 // Do not allow the notification to hide for a few seconds.
197 hide_timeout_.Start(FROM_HERE, 202 hide_timeout_.Start(FROM_HERE,
198 base::TimeDelta::FromMilliseconds(kInitialDelayMs), this, 203 base::TimeDelta::FromMilliseconds(kInitialDelayMs), this,
199 &ExclusiveAccessBubble::CheckMousePosition); 204 &ExclusiveAccessBubble::CheckMousePosition);
200 205
201 // Do not show the notification again until a long time has elapsed. 206 // Do not show the notification again until a long time has elapsed.
202 suppress_notify_timeout_.Start( 207 suppress_notify_timeout_.Start(
203 FROM_HERE, base::TimeDelta::FromMilliseconds(kSnoozeNotificationsTimeMs), 208 FROM_HERE, base::TimeDelta::FromMilliseconds(kSnoozeNotificationsTimeMs),
204 this, &ExclusiveAccessBubble::CheckMousePosition); 209 this, &ExclusiveAccessBubble::CheckMousePosition);
205 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698