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 "ash/first_run/first_run_helper_impl.h" | 5 #include "ash/first_run/first_run_helper_impl.h" |
6 | 6 |
7 #include "ash/launcher/launcher.h" | 7 #include "ash/shelf/shelf.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "ui/app_list/views/app_list_view.h" | 12 #include "ui/app_list/views/app_list_view.h" |
13 #include "ui/aura/window.h" | 13 #include "ui/aura/window.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 #include "ui/views/view.h" | 15 #include "ui/views/view.h" |
16 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
17 | 17 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 Shell::GetInstance()->ToggleAppList(NULL); | 57 Shell::GetInstance()->ToggleAppList(NULL); |
58 } | 58 } |
59 | 59 |
60 void FirstRunHelperImpl::CloseAppList() { | 60 void FirstRunHelperImpl::CloseAppList() { |
61 if (!Shell::GetInstance()->GetAppListTargetVisibility()) | 61 if (!Shell::GetInstance()->GetAppListTargetVisibility()) |
62 return; | 62 return; |
63 Shell::GetInstance()->ToggleAppList(NULL); | 63 Shell::GetInstance()->ToggleAppList(NULL); |
64 } | 64 } |
65 | 65 |
66 gfx::Rect FirstRunHelperImpl::GetLauncherBounds() { | 66 gfx::Rect FirstRunHelperImpl::GetLauncherBounds() { |
67 ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay(); | 67 Shelf* shelf = Shelf::ForPrimaryDisplay(); |
68 return launcher->GetVisibleItemsBoundsInScreen(); | 68 return shelf->GetVisibleItemsBoundsInScreen(); |
69 } | 69 } |
70 | 70 |
71 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { | 71 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { |
72 ash::Launcher* launcher = ash::Launcher::ForPrimaryDisplay(); | 72 Shelf* shelf = Shelf::ForPrimaryDisplay(); |
73 views::View* app_button = launcher->GetAppListButtonView(); | 73 views::View* app_button = shelf->GetAppListButtonView(); |
74 return app_button->GetBoundsInScreen(); | 74 return app_button->GetBoundsInScreen(); |
75 } | 75 } |
76 | 76 |
77 gfx::Rect FirstRunHelperImpl::GetAppListBounds() { | 77 gfx::Rect FirstRunHelperImpl::GetAppListBounds() { |
78 app_list::AppListView* view = Shell::GetInstance()->GetAppListView(); | 78 app_list::AppListView* view = Shell::GetInstance()->GetAppListView(); |
79 return view->GetBoundsInScreen(); | 79 return view->GetBoundsInScreen(); |
80 } | 80 } |
81 | 81 |
82 void FirstRunHelperImpl::Cancel() { | 82 void FirstRunHelperImpl::Cancel() { |
83 FOR_EACH_OBSERVER(Observer, observers(), OnCancelled()); | 83 FOR_EACH_OBSERVER(Observer, observers(), OnCancelled()); |
(...skipping 29 matching lines...) Expand all Loading... |
113 return bubble->GetBoundsInScreen(); | 113 return bubble->GetBoundsInScreen(); |
114 } | 114 } |
115 | 115 |
116 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { | 116 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { |
117 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); | 117 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); |
118 views::View* help_button = tray->GetHelpButtonView(); | 118 views::View* help_button = tray->GetHelpButtonView(); |
119 return help_button->GetBoundsInScreen(); | 119 return help_button->GetBoundsInScreen(); |
120 } | 120 } |
121 | 121 |
122 } // namespace ash | 122 } // namespace ash |
123 | |
OLD | NEW |