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; | |
71 params.keep_on_top = true; | 70 params.keep_on_top = true; |
72 params.remove_standard_frame = true; | 71 params.remove_standard_frame = true; |
73 params.delegate = delegate; | 72 params.delegate = delegate; |
74 params.bounds = bounds; | 73 params.bounds = bounds; |
75 params.parent = ash::Shell::GetContainer( | 74 params.parent = ash::Shell::GetContainer( |
76 root_window, ash::kShellWindowId_SettingBubbleContainer); | 75 root_window, ash::kShellWindowId_SettingBubbleContainer); |
77 views::Widget* widget = new views::Widget; | 76 views::Widget* widget = new views::Widget; |
78 widget->Init(params); | 77 widget->Init(params); |
79 widget->SetContentsView(view); | 78 widget->SetContentsView(view); |
80 gfx::NativeView native_view = widget->GetNativeView(); | 79 gfx::NativeView native_view = widget->GetNativeView(); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 267 |
269 view_ = new IdleAppNameNotificationDelegateView( | 268 view_ = new IdleAppNameNotificationDelegateView( |
270 this, | 269 this, |
271 app_name, | 270 app_name, |
272 error, | 271 error, |
273 message_visibility_time_in_ms + animation_time_ms); | 272 message_visibility_time_in_ms + animation_time_ms); |
274 CreateAndShowWidgetWithContent(view_, view_, animation_time_ms); | 273 CreateAndShowWidgetWithContent(view_, view_, animation_time_ms); |
275 } | 274 } |
276 | 275 |
277 } // namespace chromeos | 276 } // namespace chromeos |
OLD | NEW |