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/wm/overview/window_selector_item.h" | 5 #include "ash/wm/overview/window_selector_item.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.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/wm/overview/scoped_transform_overview_window.h" | 10 #include "ash/wm/overview/scoped_transform_overview_window.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 static const int kVerticalShadowOffset = 1; | 35 static const int kVerticalShadowOffset = 1; |
36 | 36 |
37 // Amount of blur applied to the label shadow | 37 // Amount of blur applied to the label shadow |
38 static const int kShadowBlur = 10; | 38 static const int kShadowBlur = 10; |
39 | 39 |
40 views::Widget* CreateWindowLabel(aura::Window* root_window, | 40 views::Widget* CreateWindowLabel(aura::Window* root_window, |
41 const base::string16 title) { | 41 const base::string16 title) { |
42 views::Widget* widget = new views::Widget; | 42 views::Widget* widget = new views::Widget; |
43 views::Widget::InitParams params; | 43 views::Widget::InitParams params; |
44 params.type = views::Widget::InitParams::TYPE_POPUP; | 44 params.type = views::Widget::InitParams::TYPE_POPUP; |
| 45 params.can_activate = false; |
45 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 46 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
46 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 47 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
47 params.parent = | 48 params.parent = |
48 Shell::GetContainer(root_window, ash::kShellWindowId_OverlayContainer); | 49 Shell::GetContainer(root_window, ash::kShellWindowId_OverlayContainer); |
49 params.accept_events = false; | 50 params.accept_events = false; |
50 params.visible_on_all_workspaces = true; | 51 params.visible_on_all_workspaces = true; |
51 widget->set_focus_on_creation(false); | 52 widget->set_focus_on_creation(false); |
52 widget->Init(params); | 53 widget->Init(params); |
53 views::Label* label = new views::Label; | 54 views::Label* label = new views::Label; |
54 label->SetEnabledColor(kLabelColor); | 55 label->SetEnabledColor(kLabelColor); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 ScopedTransformOverviewWindow::kTransitionMilliseconds)); | 152 ScopedTransformOverviewWindow::kTransitionMilliseconds)); |
152 window_label_->GetNativeWindow()->SetBounds(label_bounds); | 153 window_label_->GetNativeWindow()->SetBounds(label_bounds); |
153 } else { | 154 } else { |
154 window_label_->GetNativeWindow()->SetBounds(label_bounds); | 155 window_label_->GetNativeWindow()->SetBounds(label_bounds); |
155 } | 156 } |
156 } | 157 } |
157 | 158 |
158 } | 159 } |
159 | 160 |
160 } // namespace ash | 161 } // namespace ash |
OLD | NEW |