OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" | 5 #include "chrome/browser/chromeos/ui/idle_app_name_notification_view.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 gfx::Size ps = view->GetPreferredSize(); | 60 gfx::Size ps = view->GetPreferredSize(); |
61 gfx::Rect bounds((rs.width() - ps.width()) / 2, | 61 gfx::Rect bounds((rs.width() - ps.width()) / 2, |
62 -ps.height(), | 62 -ps.height(), |
63 ps.width(), | 63 ps.width(), |
64 ps.height()); | 64 ps.height()); |
65 views::Widget::InitParams params; | 65 views::Widget::InitParams params; |
66 params.type = views::Widget::InitParams::TYPE_POPUP; | 66 params.type = views::Widget::InitParams::TYPE_POPUP; |
67 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 67 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
68 params.ownership = views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET; | 68 params.ownership = views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET; |
69 params.accept_events = false; | 69 params.accept_events = false; |
| 70 params.can_activate = false; |
70 params.keep_on_top = true; | 71 params.keep_on_top = true; |
71 params.remove_standard_frame = true; | 72 params.remove_standard_frame = true; |
72 params.delegate = delegate; | 73 params.delegate = delegate; |
73 params.bounds = bounds; | 74 params.bounds = bounds; |
74 params.parent = ash::Shell::GetContainer( | 75 params.parent = ash::Shell::GetContainer( |
75 root_window, ash::kShellWindowId_SettingBubbleContainer); | 76 root_window, ash::kShellWindowId_SettingBubbleContainer); |
76 views::Widget* widget = new views::Widget; | 77 views::Widget* widget = new views::Widget; |
77 widget->Init(params); | 78 widget->Init(params); |
78 widget->SetContentsView(view); | 79 widget->SetContentsView(view); |
79 gfx::NativeView native_view = widget->GetNativeView(); | 80 gfx::NativeView native_view = widget->GetNativeView(); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 268 |
268 view_ = new IdleAppNameNotificationDelegateView( | 269 view_ = new IdleAppNameNotificationDelegateView( |
269 this, | 270 this, |
270 app_name, | 271 app_name, |
271 error, | 272 error, |
272 message_visibility_time_in_ms + animation_time_ms); | 273 message_visibility_time_in_ms + animation_time_ms); |
273 CreateAndShowWidgetWithContent(view_, view_, animation_time_ms); | 274 CreateAndShowWidgetWithContent(view_, view_, animation_time_ms); |
274 } | 275 } |
275 | 276 |
276 } // namespace chromeos | 277 } // namespace chromeos |
OLD | NEW |