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

Side by Side Diff: chrome/browser/ui/webui/cleanup_tool/cleanup_action_handler.cc

Issue 2784653004: Cleanup Tool WebUI: Add HTML content and styling with dummy JS (Closed)
Patch Set: Update urls, address review comments Created 3 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/cleanup_tool/cleanup_action_handler.h"
6
7 #include "base/bind.h"
8 #include "base/values.h"
9 #include "chrome/grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h"
11
12 CleanupActionHandler::CleanupActionHandler() {}
13
14 void CleanupActionHandler::RegisterMessages() {
15 web_ui()->RegisterMessageCallback(
16 "requestLastScanResult",
17 base::Bind(&CleanupActionHandler::HandleRequestLastScanResult,
18 base::Unretained(this)));
19 }
20
21 void CleanupActionHandler::HandleRequestLastScanResult(
22 const base::ListValue* args) {
23 // TODO(proberge): Return real information about the last run.
24 // TODO(proberge): Localize strings once they are finalized.
25 web_ui()->CallJavascriptFunctionUnsafe("cleanup.Manager.setDetectionStatus",
tommycli 2017/03/29 22:09:06 For this call-and-response pattern, we use cr.send
tommycli 2017/03/29 22:09:06 So we aren't supposed to add any more CallJavascri
proberge 2017/03/30 17:57:21 Done.
proberge 2017/03/30 17:57:21 Done.
26 base::Value(false), base::Value(false),
27 base::Value("No problems detected"),
28 base::Value("Last scanned today"));
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698