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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/pointer_handler2.cc

Issue 10274024: Learn more link for simple scrolling. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | 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/webui/options2/chromeos/pointer_handler2.h" 5 #include "chrome/browser/ui/webui/options2/chromeos/pointer_handler2.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/url_constants.h"
9 #include "content/public/browser/web_ui.h" 11 #include "content/public/browser/web_ui.h"
10 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 #include "ui/base/l10n/l10n_util.h"
11 14
12 namespace chromeos { 15 namespace chromeos {
13 namespace options2 { 16 namespace options2 {
14 17
15 PointerHandler::PointerHandler() { 18 PointerHandler::PointerHandler() {
16 } 19 }
17 20
18 PointerHandler::~PointerHandler() { 21 PointerHandler::~PointerHandler() {
19 } 22 }
20 23
21 void PointerHandler::GetLocalizedValues(DictionaryValue* localized_strings) { 24 void PointerHandler::GetLocalizedValues(DictionaryValue* localized_strings) {
22 DCHECK(localized_strings); 25 DCHECK(localized_strings);
23 26
24 static OptionsStringResource resources[] = { 27 static OptionsStringResource resources[] = {
25 { "pointerOverlayTitle", IDS_OPTIONS_POINTER_OVERLAY_TITLE }, 28 { "pointerOverlayTitle", IDS_OPTIONS_POINTER_OVERLAY_TITLE },
26 { "pointerOverlaySectionTitleTouchpad", 29 { "pointerOverlaySectionTitleTouchpad",
27 IDS_OPTIONS_POINTER_OVERLAY_SECTION_TITLE_TOUCHPAD }, 30 IDS_OPTIONS_POINTER_OVERLAY_SECTION_TITLE_TOUCHPAD },
28 { "pointerOverlaySectionTitleMouse", 31 { "pointerOverlaySectionTitleMouse",
29 IDS_OPTIONS_POINTER_OVERLAY_SECTION_TITLE_MOUSE }, 32 IDS_OPTIONS_POINTER_OVERLAY_SECTION_TITLE_MOUSE },
30 { "enableTapToClick", 33 { "enableTapToClick",
31 IDS_OPTIONS_SETTINGS_TAP_TO_CLICK_ENABLED_DESCRIPTION }, 34 IDS_OPTIONS_SETTINGS_TAP_TO_CLICK_ENABLED_DESCRIPTION },
32 { "naturalScroll",
33 IDS_OPTIONS_SETTINGS_NATURAL_SCROLL_DESCRIPTION },
34 { "primaryMouseRight", 35 { "primaryMouseRight",
35 IDS_OPTIONS_SETTINGS_PRIMARY_MOUSE_RIGHT_DESCRIPTION }, 36 IDS_OPTIONS_SETTINGS_PRIMARY_MOUSE_RIGHT_DESCRIPTION },
36 }; 37 };
37 38
39 localized_strings->SetString("naturalScroll",
40 l10n_util::GetStringFUTF16(
41 IDS_OPTIONS_SETTINGS_NATURAL_SCROLL_DESCRIPTION,
42 ASCIIToUTF16(chrome::kNaturalScrollHelpURL)));
43
38 RegisterStrings(localized_strings, resources, arraysize(resources)); 44 RegisterStrings(localized_strings, resources, arraysize(resources));
39 } 45 }
40 46
41 47
42 void PointerHandler::TouchpadExists(bool exists) { 48 void PointerHandler::TouchpadExists(bool exists) {
43 base::FundamentalValue val(exists); 49 base::FundamentalValue val(exists);
44 web_ui()->CallJavascriptFunction("PointerOverlay.showTouchpadControls", val); 50 web_ui()->CallJavascriptFunction("PointerOverlay.showTouchpadControls", val);
45 } 51 }
46 52
47 void PointerHandler::MouseExists(bool exists) { 53 void PointerHandler::MouseExists(bool exists) {
48 base::FundamentalValue val(exists); 54 base::FundamentalValue val(exists);
49 web_ui()->CallJavascriptFunction("PointerOverlay.showMouseControls", val); 55 web_ui()->CallJavascriptFunction("PointerOverlay.showMouseControls", val);
50 } 56 }
51 57
52 } // namespace options2 58 } // namespace options2
53 } // namespace chromeos 59 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/chromeos/pointer_overlay.html ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698