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/chromeos/first_run/steps/tray_step.h" | 5 #include "chrome/browser/chromeos/first_run/steps/tray_step.h" |
6 | 6 |
7 #include "ash/first_run/first_run_helper.h" | 7 #include "ash/first_run/first_run_helper.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "chrome/browser/chromeos/first_run/step_names.h" | 10 #include "chrome/browser/chromeos/first_run/step_names.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 void TrayStep::DoShow() { | 22 void TrayStep::DoShow() { |
23 if (!shell_helper()->IsTrayBubbleOpened()) | 23 if (!shell_helper()->IsTrayBubbleOpened()) |
24 shell_helper()->OpenTrayBubble(); | 24 shell_helper()->OpenTrayBubble(); |
25 gfx::Rect bounds = shell_helper()->GetTrayBubbleBounds(); | 25 gfx::Rect bounds = shell_helper()->GetTrayBubbleBounds(); |
26 actor()->AddRectangularHole(bounds.x(), bounds.y(), bounds.width(), | 26 actor()->AddRectangularHole(bounds.x(), bounds.y(), bounds.width(), |
27 bounds.height()); | 27 bounds.height()); |
28 FirstRunActor::StepPosition position; | 28 FirstRunActor::StepPosition position; |
29 position.SetTop(bounds.y()); | 29 position.SetTop(bounds.y()); |
30 ash::Shell* shell = ash::Shell::GetInstance(); | 30 ash::Shell* shell = ash::Shell::GetInstance(); |
31 ash::ShelfAlignment alignment = | 31 ash::wm::ShelfAlignment alignment = |
32 shell->GetShelfAlignment(shell->GetPrimaryRootWindow()); | 32 shell->GetShelfAlignment(shell->GetPrimaryRootWindow()); |
33 if ((!base::i18n::IsRTL() && alignment != ash::SHELF_ALIGNMENT_LEFT) || | 33 if ((!base::i18n::IsRTL() && alignment != ash::wm::SHELF_ALIGNMENT_LEFT) || |
34 alignment == ash::SHELF_ALIGNMENT_RIGHT) | 34 alignment == ash::wm::SHELF_ALIGNMENT_RIGHT) |
35 position.SetRight(GetOverlaySize().width() - bounds.x()); | 35 position.SetRight(GetOverlaySize().width() - bounds.x()); |
36 else | 36 else |
37 position.SetLeft(bounds.right()); | 37 position.SetLeft(bounds.right()); |
38 actor()->ShowStepPositioned(name(), position); | 38 actor()->ShowStepPositioned(name(), position); |
39 } | 39 } |
40 | 40 |
41 } // namespace first_run | 41 } // namespace first_run |
42 } // namespace chromeos | 42 } // namespace chromeos |
43 | 43 |
OLD | NEW |