| OLD | NEW |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 const StepPosition& position) { | 47 const StepPosition& position) { |
| 48 web_ui()->CallJavascriptFunction("cr.FirstRun.showStep", | 48 web_ui()->CallJavascriptFunction("cr.FirstRun.showStep", |
| 49 base::StringValue(name), | 49 base::StringValue(name), |
| 50 *position.AsValue()); | 50 *position.AsValue()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void FirstRunHandler::ShowStepPointingTo(const std::string& name, | 53 void FirstRunHandler::ShowStepPointingTo(const std::string& name, |
| 54 int x, | 54 int x, |
| 55 int y, | 55 int y, |
| 56 int offset) { | 56 int offset) { |
| 57 scoped_ptr<base::Value> null(base::Value::CreateNullValue()); | 57 scoped_ptr<base::Value> null = base::Value::CreateNullValue(); |
| 58 base::ListValue point_with_offset; | 58 base::ListValue point_with_offset; |
| 59 point_with_offset.AppendInteger(x); | 59 point_with_offset.AppendInteger(x); |
| 60 point_with_offset.AppendInteger(y); | 60 point_with_offset.AppendInteger(y); |
| 61 point_with_offset.AppendInteger(offset); | 61 point_with_offset.AppendInteger(offset); |
| 62 web_ui()->CallJavascriptFunction("cr.FirstRun.showStep", | 62 web_ui()->CallJavascriptFunction("cr.FirstRun.showStep", |
| 63 base::StringValue(name), | 63 base::StringValue(name), |
| 64 *null, | 64 *null, |
| 65 point_with_offset); | 65 point_with_offset); |
| 66 } | 66 } |
| 67 | 67 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 delegate()->OnStepHidden(step_name); | 130 delegate()->OnStepHidden(step_name); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void FirstRunHandler::HandleFinalized(const base::ListValue* args) { | 133 void FirstRunHandler::HandleFinalized(const base::ListValue* args) { |
| 134 is_finalizing_ = false; | 134 is_finalizing_ = false; |
| 135 if (delegate()) | 135 if (delegate()) |
| 136 delegate()->OnActorFinalized(); | 136 delegate()->OnActorFinalized(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace chromeos | 139 } // namespace chromeos |
| OLD | NEW |