OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/ui/views/message_center/notification_bubble_wrapper_win
.h" | 5 #include "chrome/browser/ui/views/message_center/notification_bubble_wrapper_win
.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/ui/views/message_center/web_notification_tray_win.h" | 8 #include "chrome/browser/ui/views/message_center/web_notification_tray_win.h" |
9 #include "ui/gfx/size.h" | 9 #include "ui/gfx/size.h" |
10 #include "ui/message_center/message_bubble_base.h" | 10 #include "ui/message_center/message_bubble_base.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 bubble_view_(NULL), | 34 bubble_view_(NULL), |
35 bubble_widget_(NULL), | 35 bubble_widget_(NULL), |
36 tray_(tray) { | 36 tray_(tray) { |
37 // Windows-specific initialization. | 37 // Windows-specific initialization. |
38 views::TrayBubbleView::AnchorAlignment anchor_alignment = | 38 views::TrayBubbleView::AnchorAlignment anchor_alignment = |
39 tray_->GetAnchorAlignment(); | 39 tray_->GetAnchorAlignment(); |
40 views::TrayBubbleView::InitParams init_params = | 40 views::TrayBubbleView::InitParams init_params = |
41 bubble_->GetInitParams(anchor_alignment); | 41 bubble_->GetInitParams(anchor_alignment); |
42 init_params.close_on_deactivate = false; | 42 init_params.close_on_deactivate = false; |
43 init_params.arrow_alignment = views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE; | 43 init_params.arrow_alignment = views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE; |
44 init_params.hide_arrow = true; | 44 init_params.arrow_paint_type = views::BubbleBorder::PAINT_NONE; |
45 // TODO(dewittj): Show big shadow without blocking clicks. | 45 // TODO(dewittj): Show big shadow without blocking clicks. |
46 init_params.shadow = views::BubbleBorder::NO_SHADOW; | 46 init_params.shadow = views::BubbleBorder::NO_SHADOW; |
47 | 47 |
48 bubble_view_ = views::TrayBubbleView::Create( | 48 bubble_view_ = views::TrayBubbleView::Create( |
49 tray_->GetBubbleWindowContainer(), NULL, this, &init_params); | 49 tray_->GetBubbleWindowContainer(), NULL, this, &init_params); |
50 | 50 |
51 bubble_widget_ = views::BubbleDelegateView::CreateBubble(bubble_view_); | 51 bubble_widget_ = views::BubbleDelegateView::CreateBubble(bubble_view_); |
52 bubble_widget_->AddObserver(this); | 52 bubble_widget_->AddObserver(this); |
53 bubble_widget_->StackAtTop(); | 53 bubble_widget_->StackAtTop(); |
54 bubble_widget_->SetAlwaysOnTop(true); | 54 bubble_widget_->SetAlwaysOnTop(true); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 void NotificationBubbleWrapperWin::HideBubble( | 103 void NotificationBubbleWrapperWin::HideBubble( |
104 const views::TrayBubbleView* bubble_view) { | 104 const views::TrayBubbleView* bubble_view) { |
105 tray_->HideBubbleWithView(bubble_view); | 105 tray_->HideBubbleWithView(bubble_view); |
106 } | 106 } |
107 | 107 |
108 } // namespace internal | 108 } // namespace internal |
109 | 109 |
110 } // namespace message_center | 110 } // namespace message_center |
OLD | NEW |