OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/theme_install_bubble_view.h" | 5 #include "chrome/browser/views/theme_install_bubble_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "chrome/browser/tab_contents/tab_contents.h" | 9 #include "chrome/browser/tab_contents/tab_contents.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // Don't let the bubble overlap the confirm dialog. | 64 // Don't let the bubble overlap the confirm dialog. |
65 registrar_.Add( | 65 registrar_.Add( |
66 this, | 66 this, |
67 NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, | 67 NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, |
68 NotificationService::AllSources()); | 68 NotificationService::AllSources()); |
69 | 69 |
70 gfx::Rect rc(0, 0, 0, 0); | 70 gfx::Rect rc(0, 0, 0, 0); |
71 popup_ = views::Widget::CreatePopupWidget(views::Widget::Transparent, | 71 popup_ = views::Widget::CreatePopupWidget(views::Widget::Transparent, |
72 views::Widget::NotAcceptEvents, | 72 views::Widget::NotAcceptEvents, |
73 views::Widget::DeleteOnDestroy); | 73 views::Widget::DeleteOnDestroy, |
| 74 views::Widget::MirrorOriginInRTL); |
74 popup_->SetOpacity(0xCC); | 75 popup_->SetOpacity(0xCC); |
75 popup_->Init(tab_contents->GetNativeView(), rc); | 76 popup_->Init(tab_contents->GetNativeView(), rc); |
76 popup_->SetContentsView(this); | 77 popup_->SetContentsView(this); |
77 Reposition(); | 78 Reposition(); |
78 popup_->Show(); | 79 popup_->Show(); |
79 | 80 |
80 SchedulePaint(); | 81 SchedulePaint(); |
81 } | 82 } |
82 | 83 |
83 ThemeInstallBubbleView::~ThemeInstallBubbleView() { | 84 ThemeInstallBubbleView::~ThemeInstallBubbleView() { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 Close(); | 155 Close(); |
155 } | 156 } |
156 | 157 |
157 // static | 158 // static |
158 void ThemeInstallBubbleView::Show(TabContents* tab_contents) { | 159 void ThemeInstallBubbleView::Show(TabContents* tab_contents) { |
159 ++num_loads_extant_; | 160 ++num_loads_extant_; |
160 if (num_loads_extant_ < 2) | 161 if (num_loads_extant_ < 2) |
161 new ThemeInstallBubbleView(tab_contents); | 162 new ThemeInstallBubbleView(tab_contents); |
162 } | 163 } |
163 | 164 |
OLD | NEW |