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/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
8 #include "ash/shelf/app_list_button.h" | 8 #include "ash/shelf/app_list_button.h" |
| 9 #include "ash/shelf/shelf.h" |
9 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
10 #include "ash/shelf/wm_shelf.h" | |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/system/tray/system_tray.h" | 12 #include "ash/system/tray/system_tray.h" |
13 #include "ash/wm_window.h" | 13 #include "ash/wm_window.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "ui/app_list/views/app_list_view.h" | 15 #include "ui/app_list/views/app_list_view.h" |
16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
17 #include "ui/display/display.h" | 17 #include "ui/display/display.h" |
18 #include "ui/display/screen.h" | 18 #include "ui/display/screen.h" |
19 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
20 #include "ui/views/view.h" | 20 #include "ui/views/view.h" |
(...skipping 27 matching lines...) Expand all Loading... |
48 if (IsTrayBubbleOpened()) | 48 if (IsTrayBubbleOpened()) |
49 CloseTrayBubble(); | 49 CloseTrayBubble(); |
50 widget_->Close(); | 50 widget_->Close(); |
51 } | 51 } |
52 | 52 |
53 views::Widget* FirstRunHelperImpl::GetOverlayWidget() { | 53 views::Widget* FirstRunHelperImpl::GetOverlayWidget() { |
54 return widget_; | 54 return widget_; |
55 } | 55 } |
56 | 56 |
57 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { | 57 gfx::Rect FirstRunHelperImpl::GetAppListButtonBounds() { |
58 WmShelf* shelf = WmShelf::ForWindow(Shell::GetPrimaryRootWindow()); | 58 Shelf* shelf = Shelf::ForWindow(Shell::GetPrimaryRootWindow()); |
59 AppListButton* app_button = shelf->shelf_widget()->GetAppListButton(); | 59 AppListButton* app_button = shelf->shelf_widget()->GetAppListButton(); |
60 return app_button->GetBoundsInScreen(); | 60 return app_button->GetBoundsInScreen(); |
61 } | 61 } |
62 | 62 |
63 void FirstRunHelperImpl::Cancel() { | 63 void FirstRunHelperImpl::Cancel() { |
64 for (auto& observer : observers()) | 64 for (auto& observer : observers()) |
65 observer.OnCancelled(); | 65 observer.OnCancelled(); |
66 } | 66 } |
67 | 67 |
68 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) { | 68 bool FirstRunHelperImpl::IsCancelingKeyEvent(ui::KeyEvent* event) { |
(...skipping 26 matching lines...) Expand all Loading... |
95 return bubble->GetBoundsInScreen(); | 95 return bubble->GetBoundsInScreen(); |
96 } | 96 } |
97 | 97 |
98 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { | 98 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { |
99 SystemTray* tray = Shell::Get()->GetPrimarySystemTray(); | 99 SystemTray* tray = Shell::Get()->GetPrimarySystemTray(); |
100 views::View* help_button = tray->GetHelpButtonView(); | 100 views::View* help_button = tray->GetHelpButtonView(); |
101 return help_button->GetBoundsInScreen(); | 101 return help_button->GetBoundsInScreen(); |
102 } | 102 } |
103 | 103 |
104 } // namespace ash | 104 } // namespace ash |
OLD | NEW |