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

Side by Side Diff: chrome/browser/chromeos/first_run/steps/tray_step.cc

Issue 2036353002: mash: Move ash/common/wm/shelf to ash/common/shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 6 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
« no previous file with comments | « ash/wm/workspace_controller_unittest.cc ('k') | chrome/browser/ui/apps/chrome_app_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/shelf/shelf.h" 8 #include "ash/shelf/shelf.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"
11 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h" 11 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 namespace first_run { 16 namespace first_run {
17 17
18 TrayStep::TrayStep(ash::FirstRunHelper* shell_helper, FirstRunActor* actor) 18 TrayStep::TrayStep(ash::FirstRunHelper* shell_helper, FirstRunActor* actor)
19 : Step(kTrayStep, shell_helper, actor) { 19 : Step(kTrayStep, shell_helper, actor) {
20 } 20 }
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::wm::ShelfAlignment alignment = 30 ash::ShelfAlignment alignment = ash::Shelf::ForPrimaryDisplay()->alignment();
31 ash::Shelf::ForPrimaryDisplay()->alignment(); 31 if ((!base::i18n::IsRTL() && alignment != ash::SHELF_ALIGNMENT_LEFT) ||
32 if ((!base::i18n::IsRTL() && alignment != ash::wm::SHELF_ALIGNMENT_LEFT) || 32 alignment == ash::SHELF_ALIGNMENT_RIGHT)
33 alignment == ash::wm::SHELF_ALIGNMENT_RIGHT)
34 position.SetRight(GetOverlaySize().width() - bounds.x()); 33 position.SetRight(GetOverlaySize().width() - bounds.x());
35 else 34 else
36 position.SetLeft(bounds.right()); 35 position.SetLeft(bounds.right());
37 actor()->ShowStepPositioned(name(), position); 36 actor()->ShowStepPositioned(name(), position);
38 } 37 }
39 38
40 } // namespace first_run 39 } // namespace first_run
41 } // namespace chromeos 40 } // namespace chromeos
42 41
OLDNEW
« no previous file with comments | « ash/wm/workspace_controller_unittest.cc ('k') | chrome/browser/ui/apps/chrome_app_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698