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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 2216933003: Implement the palette help and options buttons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@palette-delegate
Patch Set: Address nit Created 4 years, 4 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 | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 namespace { 129 namespace {
130 130
131 // The minimum session length limit that can be set. 131 // The minimum session length limit that can be set.
132 const int kSessionLengthLimitMinMs = 30 * 1000; // 30 seconds. 132 const int kSessionLengthLimitMinMs = 30 * 1000; // 30 seconds.
133 133
134 // The maximum session length limit that can be set. 134 // The maximum session length limit that can be set.
135 const int kSessionLengthLimitMaxMs = 24 * 60 * 60 * 1000; // 24 hours. 135 const int kSessionLengthLimitMaxMs = 24 * 60 * 60 * 1000; // 24 hours.
136 136
137 const char kDisplaySettingsSubPageName[] = "display"; 137 const char kDisplaySettingsSubPageName[] = "display";
138 const char kDisplayOverscanSettingsSubPageName[] = "displayOverscan"; 138 const char kDisplayOverscanSettingsSubPageName[] = "displayOverscan";
139 const char kPaletteSettingsSubPageName[] = "note-overlay";
139 140
140 void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime, 141 void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime,
141 const input_method::InputMethodUtil& util, 142 const input_method::InputMethodUtil& util,
142 ash::IMEInfo* info) { 143 ash::IMEInfo* info) {
143 info->id = ime.id(); 144 info->id = ime.id();
144 info->name = util.GetInputMethodLongName(ime); 145 info->name = util.GetInputMethodLongName(ime);
145 info->medium_name = util.GetInputMethodMediumName(ime); 146 info->medium_name = util.GetInputMethodMediumName(ime);
146 info->short_name = util.GetInputMethodShortName(ime); 147 info->short_name = util.GetInputMethodShortName(ime);
147 info->third_party = extension_ime_util::IsExtensionIME(ime.id()); 148 info->third_party = extension_ime_util::IsExtensionIME(ime.id());
148 } 149 }
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 514 }
514 515
515 void SystemTrayDelegateChromeOS::ShowAccessibilitySettings() { 516 void SystemTrayDelegateChromeOS::ShowAccessibilitySettings() {
516 content::RecordAction(base::UserMetricsAction("ShowAccessibilitySettings")); 517 content::RecordAction(base::UserMetricsAction("ShowAccessibilitySettings"));
517 std::string sub_page = std::string(chrome::kSearchSubPage) + "#" + 518 std::string sub_page = std::string(chrome::kSearchSubPage) + "#" +
518 l10n_util::GetStringUTF8( 519 l10n_util::GetStringUTF8(
519 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY); 520 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY);
520 ShowSettingsSubPageForActiveUser(sub_page); 521 ShowSettingsSubPageForActiveUser(sub_page);
521 } 522 }
522 523
524 void SystemTrayDelegateChromeOS::ShowPaletteHelp() {
525 chrome::ScopedTabbedBrowserDisplayer displayer(
526 ProfileManager::GetActiveUserProfile());
527 chrome::ShowSingletonTab(displayer.browser(),
528 GURL(chrome::kChromePaletteHelpURL));
529 }
530
531 void SystemTrayDelegateChromeOS::ShowPaletteSettings() {
532 content::RecordAction(base::UserMetricsAction("ShowPaletteOptions"));
533 ShowSettingsSubPageForActiveUser(kPaletteSettingsSubPageName);
534 }
535
523 void SystemTrayDelegateChromeOS::ShowPublicAccountInfo() { 536 void SystemTrayDelegateChromeOS::ShowPublicAccountInfo() {
524 chrome::ScopedTabbedBrowserDisplayer displayer( 537 chrome::ScopedTabbedBrowserDisplayer displayer(
525 ProfileManager::GetActiveUserProfile()); 538 ProfileManager::GetActiveUserProfile());
526 chrome::ShowPolicy(displayer.browser()); 539 chrome::ShowPolicy(displayer.browser());
527 } 540 }
528 541
529 void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() { 542 void SystemTrayDelegateChromeOS::ShowSupervisedUserInfo() {
530 // TODO(antrim): find out what should we show in this case. 543 // TODO(antrim): find out what should we show in this case.
531 // http://crbug.com/229762 544 // http://crbug.com/229762
532 } 545 }
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1340 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1328 << "ENABLE_SUPERVISED_USERS undefined."; 1341 << "ENABLE_SUPERVISED_USERS undefined.";
1329 return base::string16(); 1342 return base::string16();
1330 } 1343 }
1331 1344
1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1345 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1333 return new SystemTrayDelegateChromeOS(); 1346 return new SystemTrayDelegateChromeOS();
1334 } 1347 }
1335 1348
1336 } // namespace chromeos 1349 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698