| 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/shelf/shelf.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 |
| 18 namespace ash { | 18 namespace ash { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 views::Widget* CreateFirstRunWindow() { | 22 views::Widget* CreateFirstRunWindow() { |
| 23 views::Widget::InitParams params( | 23 views::Widget::InitParams params( |
| 24 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 24 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 25 params.bounds = Shell::GetScreen()->GetPrimaryDisplay().bounds(); | 25 params.bounds = Shell::GetScreen()->GetPrimaryDisplay().bounds(); |
| 26 params.show_state = ui::SHOW_STATE_FULLSCREEN; | 26 params.show_state = ui::SHOW_STATE_FULLSCREEN; |
| 27 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 27 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 28 params.parent = | 28 params.parent = Shell::GetContainer(Shell::GetPrimaryRootWindow(), |
| 29 Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 29 ash::kShellWindowId_OverlayContainer); |
| 30 ash::internal::kShellWindowId_OverlayContainer); | |
| 31 views::Widget* window = new views::Widget; | 30 views::Widget* window = new views::Widget; |
| 32 window->Init(params); | 31 window->Init(params); |
| 33 return window; | 32 return window; |
| 34 } | 33 } |
| 35 | 34 |
| 36 } // anonymous namespace | 35 } // anonymous namespace |
| 37 | 36 |
| 38 FirstRunHelperImpl::FirstRunHelperImpl() | 37 FirstRunHelperImpl::FirstRunHelperImpl() |
| 39 : widget_(CreateFirstRunWindow()) { | 38 : widget_(CreateFirstRunWindow()) { |
| 40 Shell::GetInstance()->overlay_filter()->Activate(this); | 39 Shell::GetInstance()->overlay_filter()->Activate(this); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return bubble->GetBoundsInScreen(); | 112 return bubble->GetBoundsInScreen(); |
| 114 } | 113 } |
| 115 | 114 |
| 116 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { | 115 gfx::Rect FirstRunHelperImpl::GetHelpButtonBounds() { |
| 117 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); | 116 SystemTray* tray = Shell::GetInstance()->GetPrimarySystemTray(); |
| 118 views::View* help_button = tray->GetHelpButtonView(); | 117 views::View* help_button = tray->GetHelpButtonView(); |
| 119 return help_button->GetBoundsInScreen(); | 118 return help_button->GetBoundsInScreen(); |
| 120 } | 119 } |
| 121 | 120 |
| 122 } // namespace ash | 121 } // namespace ash |
| OLD | NEW |