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

Side by Side Diff: chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/first_run/first_run_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "content/public/browser/web_ui.h" 9 #include "content/public/browser/web_ui.h"
10 10
(...skipping 25 matching lines...) Expand all
36 base::Value(radius)); 36 base::Value(radius));
37 } 37 }
38 38
39 void FirstRunHandler::RemoveBackgroundHoles() { 39 void FirstRunHandler::RemoveBackgroundHoles() {
40 web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.removeHoles"); 40 web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.removeHoles");
41 } 41 }
42 42
43 void FirstRunHandler::ShowStepPositioned(const std::string& name, 43 void FirstRunHandler::ShowStepPositioned(const std::string& name,
44 const StepPosition& position) { 44 const StepPosition& position) {
45 web_ui()->CallJavascriptFunctionUnsafe( 45 web_ui()->CallJavascriptFunctionUnsafe(
46 "cr.FirstRun.showStep", base::StringValue(name), *position.AsValue()); 46 "cr.FirstRun.showStep", base::Value(name), *position.AsValue());
47 } 47 }
48 48
49 void FirstRunHandler::ShowStepPointingTo(const std::string& name, 49 void FirstRunHandler::ShowStepPointingTo(const std::string& name,
50 int x, 50 int x,
51 int y, 51 int y,
52 int offset) { 52 int offset) {
53 std::unique_ptr<base::Value> null = base::Value::CreateNullValue(); 53 std::unique_ptr<base::Value> null = base::Value::CreateNullValue();
54 base::ListValue point_with_offset; 54 base::ListValue point_with_offset;
55 point_with_offset.AppendInteger(x); 55 point_with_offset.AppendInteger(x);
56 point_with_offset.AppendInteger(y); 56 point_with_offset.AppendInteger(y);
57 point_with_offset.AppendInteger(offset); 57 point_with_offset.AppendInteger(offset);
58 web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.showStep", 58 web_ui()->CallJavascriptFunctionUnsafe(
59 base::StringValue(name), *null, 59 "cr.FirstRun.showStep", base::Value(name), *null, point_with_offset);
60 point_with_offset);
61 } 60 }
62 61
63 void FirstRunHandler::HideCurrentStep() { 62 void FirstRunHandler::HideCurrentStep() {
64 web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.hideCurrentStep"); 63 web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.hideCurrentStep");
65 } 64 }
66 65
67 void FirstRunHandler::Finalize() { 66 void FirstRunHandler::Finalize() {
68 is_finalizing_ = true; 67 is_finalizing_ = true;
69 web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.finalize"); 68 web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.finalize");
70 } 69 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 delegate()->OnStepHidden(step_name); 124 delegate()->OnStepHidden(step_name);
126 } 125 }
127 126
128 void FirstRunHandler::HandleFinalized(const base::ListValue* args) { 127 void FirstRunHandler::HandleFinalized(const base::ListValue* args) {
129 is_finalizing_ = false; 128 is_finalizing_ = false;
130 if (delegate()) 129 if (delegate())
131 delegate()->OnActorFinalized(); 130 delegate()->OnActorFinalized();
132 } 131 }
133 132
134 } // namespace chromeos 133 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698