OLD | NEW |
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/pointer_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/pointer_handler.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 72 } |
73 | 73 |
74 void PointerHandler::UpdateTitle() { | 74 void PointerHandler::UpdateTitle() { |
75 std::string label; | 75 std::string label; |
76 if (has_touchpad_) { | 76 if (has_touchpad_) { |
77 label = has_mouse_ ? "pointerOverlayTitleTouchpadMouse" : | 77 label = has_mouse_ ? "pointerOverlayTitleTouchpadMouse" : |
78 "pointerOverlayTitleTouchpadOnly"; | 78 "pointerOverlayTitleTouchpadOnly"; |
79 } else { | 79 } else { |
80 label = has_mouse_ ? "pointerOverlayTitleMouseOnly" : ""; | 80 label = has_mouse_ ? "pointerOverlayTitleMouseOnly" : ""; |
81 } | 81 } |
82 base::StringValue val(label); | 82 base::Value val(label); |
83 web_ui()->CallJavascriptFunctionUnsafe("PointerOverlay.setTitle", val); | 83 web_ui()->CallJavascriptFunctionUnsafe("PointerOverlay.setTitle", val); |
84 } | 84 } |
85 | 85 |
86 } // namespace options | 86 } // namespace options |
87 } // namespace chromeos | 87 } // namespace chromeos |
OLD | NEW |