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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h"
9 #include "base/values.h"
12 const int kNoneValue
= std::numeric_limits
<int>::min();
17 FirstRunActor::StepPosition::StepPosition()
24 FirstRunActor::StepPosition
& FirstRunActor::StepPosition::SetTop(int top
) {
29 FirstRunActor::StepPosition
& FirstRunActor::StepPosition::SetRight(int right
) {
34 FirstRunActor::StepPosition
&
35 FirstRunActor::StepPosition::SetBottom(int bottom
) {
40 FirstRunActor::StepPosition
& FirstRunActor::StepPosition::SetLeft(int left
) {
45 scoped_ptr
<base::DictionaryValue
> FirstRunActor::StepPosition::AsValue() const {
46 base::DictionaryValue
* result
= new base::DictionaryValue();
47 if (top_
!= kNoneValue
)
48 result
->SetInteger("top", top_
);
49 if (right_
!= kNoneValue
)
50 result
->SetInteger("right", right_
);
51 if (bottom_
!= kNoneValue
)
52 result
->SetInteger("bottom", bottom_
);
53 if (left_
!= kNoneValue
)
54 result
->SetInteger("left", left_
);
55 return make_scoped_ptr(result
);
58 FirstRunActor::FirstRunActor()
62 FirstRunActor::~FirstRunActor() {
64 delegate()->OnActorDestroyed();
68 } // namespace chromeos