OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/touch/touch_observer_hud.h" | 5 #include "ash/touch/touch_observer_hud.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/root_window_settings.h" | 8 #include "ash/root_window_settings.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 views::View* content = new views::View; | 27 views::View* content = new views::View; |
28 | 28 |
29 const gfx::Size& display_size = display.size(); | 29 const gfx::Size& display_size = display.size(); |
30 content->SetSize(display_size); | 30 content->SetSize(display_size); |
31 | 31 |
32 widget_ = new views::Widget(); | 32 widget_ = new views::Widget(); |
33 views::Widget::InitParams | 33 views::Widget::InitParams |
34 params(views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 34 params(views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
35 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 35 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
36 params.can_activate = false; | 36 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
37 params.accept_events = false; | 37 params.accept_events = false; |
38 params.bounds = display.bounds(); | 38 params.bounds = display.bounds(); |
39 params.parent = | 39 params.parent = |
40 Shell::GetContainer(root_window_, kShellWindowId_OverlayContainer); | 40 Shell::GetContainer(root_window_, kShellWindowId_OverlayContainer); |
41 widget_->Init(params); | 41 widget_->Init(params); |
42 widget_->SetContentsView(content); | 42 widget_->SetContentsView(content); |
43 widget_->StackAtTop(); | 43 widget_->StackAtTop(); |
44 widget_->Show(); | 44 widget_->Show(); |
45 | 45 |
46 widget_->AddObserver(this); | 46 widget_->AddObserver(this); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 widget_->GetNativeView(), | 141 widget_->GetNativeView(), |
142 Shell::GetContainer(root_window_, kShellWindowId_OverlayContainer)); | 142 Shell::GetContainer(root_window_, kShellWindowId_OverlayContainer)); |
143 | 143 |
144 RootWindowController* controller = GetRootWindowController(root_window_); | 144 RootWindowController* controller = GetRootWindowController(root_window_); |
145 SetHudForRootWindowController(controller); | 145 SetHudForRootWindowController(controller); |
146 | 146 |
147 root_window_->AddPreTargetHandler(this); | 147 root_window_->AddPreTargetHandler(this); |
148 } | 148 } |
149 | 149 |
150 } // namespace ash | 150 } // namespace ash |
OLD | NEW |