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

Side by Side Diff: chrome/browser/ui/views/exclusive_access_bubble_views.cc

Issue 2110743002: Mac: Use "esc" rather than "Esc" in "Press Esc to exit full screen". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/exclusive_access_bubble_views.h" 5 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/case_conversion.h"
9 #include "base/location.h" 10 #include "base/location.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
14 #include "build/build_config.h" 15 #include "build/build_config.h"
15 #include "chrome/app/chrome_command_ids.h" 16 #include "chrome/app/chrome_command_ids.h"
16 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" 18 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
18 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 19 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 bubble_type == 169 bubble_type ==
169 EXCLUSIVE_ACCESS_BUBBLE_TYPE_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION) { 170 EXCLUSIVE_ACCESS_BUBBLE_TYPE_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION) {
170 accelerator = browser_fullscreen_exit_accelerator_; 171 accelerator = browser_fullscreen_exit_accelerator_;
171 } else { 172 } else {
172 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY); 173 accelerator = l10n_util::GetStringUTF16(IDS_APP_ESC_KEY);
173 if (bubble_type != 174 if (bubble_type !=
174 EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_EXIT_INSTRUCTION) { 175 EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_EXIT_INSTRUCTION) {
175 link_visible = false; 176 link_visible = false;
176 } 177 }
177 } 178 }
179 #if defined(OS_MACOSX)
180 // Mac keyboards use lowercase for everything except function keys, which are
181 // typically reserved for system use. Since |accelerator| is placed in a box
182 // to make it look like a keyboard key it looks weird to not follow suit.
183 accelerator = base::i18n::ToLower(accelerator);
184 #endif
178 base::string16 link_text; 185 base::string16 link_text;
179 base::string16 exit_instruction_text; 186 base::string16 exit_instruction_text;
180 if (link_visible) { 187 if (link_visible) {
181 link_text = l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE); 188 link_text = l10n_util::GetStringUTF16(IDS_EXIT_FULLSCREEN_MODE);
182 #if !defined(OS_CHROMEOS) 189 #if !defined(OS_CHROMEOS)
183 link_text += base::UTF8ToUTF16(" ") + 190 link_text += base::UTF8ToUTF16(" ") +
184 l10n_util::GetStringFUTF16( 191 l10n_util::GetStringFUTF16(
185 IDS_EXIT_FULLSCREEN_MODE_ACCELERATOR, accelerator); 192 IDS_EXIT_FULLSCREEN_MODE_ACCELERATOR, accelerator);
186 #endif 193 #endif
187 } else { 194 } else {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged( 285 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged(
279 views::Widget* widget, 286 views::Widget* widget,
280 bool visible) { 287 bool visible) {
281 UpdateMouseWatcher(); 288 UpdateMouseWatcher();
282 } 289 }
283 290
284 void ExclusiveAccessBubbleViews::LinkClicked(views::Link* link, 291 void ExclusiveAccessBubbleViews::LinkClicked(views::Link* link,
285 int event_flags) { 292 int event_flags) {
286 ExitExclusiveAccess(); 293 ExitExclusiveAccess();
287 } 294 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698