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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/note_handler.cc

Issue 2178213002: Add note page to settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stylus-add-switch
Patch Set: Initial upload 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/chromeos/note_handler.cc
diff --git a/chrome/browser/ui/webui/settings/chromeos/note_handler.cc b/chrome/browser/ui/webui/settings/chromeos/note_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b6cf0183671e8b17e369092fc6264c3f6ae40056
--- /dev/null
+++ b/chrome/browser/ui/webui/settings/chromeos/note_handler.cc
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/settings/chromeos/note_handler.h"
+
+#include "ash/common/ash_switches.h"
+#include "base/command_line.h"
+#include "content/public/browser/web_ui_data_source.h"
+
+namespace chromeos {
+namespace settings {
+
+namespace {
+
+bool IsPaletteEnabled() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshEnablePalette);
+}
+
+} // namespace
+
+NoteHandler::NoteHandler(content::WebUIDataSource* html_source) {
jdufault 2016/07/26 19:42:56 For right now, the handler is very simple, so it i
stevenjb 2016/07/26 23:21:39 Ideally we will use an extension API instead of a
jdufault 2016/07/27 20:55:02 Most settings UI appears to use an message handler
stevenjb 2016/07/27 22:29:42 Some day, we would like to be able to run device s
jdufault 2016/07/28 17:54:40 Done.
+ html_source->AddBoolean("noteAllowed", IsPaletteEnabled());
+}
+
+NoteHandler::~NoteHandler() {}
+
+void NoteHandler::RegisterMessages() {}
+
+void NoteHandler::OnJavascriptAllowed() {}
+
+void NoteHandler::OnJavascriptDisallowed() {}
+
+} // namespace settings
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698