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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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/webui/options/chromeos/keyboard_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/keyboard_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 option->Append(new base::FundamentalValue(value)); 127 option->Append(new base::FundamentalValue(value));
128 option->Append(new base::StringValue(l10n_util::GetStringUTF16( 128 option->Append(new base::StringValue(l10n_util::GetStringUTF16(
129 message_id))); 129 message_id)));
130 list_value->Append(option); 130 list_value->Append(option);
131 } 131 }
132 localized_strings->Set(kDataValuesNames[i], list_value); 132 localized_strings->Set(kDataValuesNames[i], list_value);
133 } 133 }
134 } 134 }
135 135
136 void KeyboardHandler::InitializePage() { 136 void KeyboardHandler::InitializePage() {
137 bool chromeos_keyboard = CommandLine::ForCurrentProcess()->HasSwitch( 137 bool chromeos_keyboard = base::CommandLine::ForCurrentProcess()->HasSwitch(
138 chromeos::switches::kHasChromeOSKeyboard); 138 chromeos::switches::kHasChromeOSKeyboard);
139 const base::FundamentalValue show_caps_lock_options(!chromeos_keyboard); 139 const base::FundamentalValue show_caps_lock_options(!chromeos_keyboard);
140 140
141 bool has_diamond_key = CommandLine::ForCurrentProcess()->HasSwitch( 141 bool has_diamond_key = base::CommandLine::ForCurrentProcess()->HasSwitch(
142 chromeos::switches::kHasChromeOSDiamondKey); 142 chromeos::switches::kHasChromeOSDiamondKey);
143 const base::FundamentalValue show_diamond_key_options(has_diamond_key); 143 const base::FundamentalValue show_diamond_key_options(has_diamond_key);
144 144
145 web_ui()->CallJavascriptFunction( 145 web_ui()->CallJavascriptFunction(
146 "options.KeyboardOverlay.showCapsLockOptions", 146 "options.KeyboardOverlay.showCapsLockOptions",
147 show_caps_lock_options); 147 show_caps_lock_options);
148 web_ui()->CallJavascriptFunction( 148 web_ui()->CallJavascriptFunction(
149 "options.KeyboardOverlay.showDiamondKeyOptions", 149 "options.KeyboardOverlay.showDiamondKeyOptions",
150 show_diamond_key_options); 150 show_diamond_key_options);
151 } 151 }
(...skipping 10 matching lines...) Expand all
162 #if !defined(USE_ATHENA) 162 #if !defined(USE_ATHENA)
163 // Athena doesn't have ash::Shell and its new_window_delegate so keyboard 163 // Athena doesn't have ash::Shell and its new_window_delegate so keyboard
164 // shortcut overlays are not supported. 164 // shortcut overlays are not supported.
165 // TODO(mukai): re-enable this. 165 // TODO(mukai): re-enable this.
166 ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay(); 166 ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay();
167 #endif 167 #endif
168 } 168 }
169 169
170 } // namespace options 170 } // namespace options
171 } // namespace chromeos 171 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698