Chromium Code Reviews| 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 |