OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/disabled_extensions_view.h" | 5 #include "chrome/browser/ui/views/extensions/disabled_extensions_view.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 wiped_out_(wiped_out), | 79 wiped_out_(wiped_out), |
80 headline_(NULL), | 80 headline_(NULL), |
81 learn_more_(NULL), | 81 learn_more_(NULL), |
82 settings_button_(NULL), | 82 settings_button_(NULL), |
83 dismiss_button_(NULL), | 83 dismiss_button_(NULL), |
84 recourse_(NULL) { | 84 recourse_(NULL) { |
85 set_close_on_deactivate(false); | 85 set_close_on_deactivate(false); |
86 set_move_with_anchor(true); | 86 set_move_with_anchor(true); |
87 set_close_on_esc(true); | 87 set_close_on_esc(true); |
88 | 88 |
89 // TODO(finnur): Until http://crbug.com/165808 is fixed, we need to turn off | |
90 // the shadow because it causes the bubble to overlap the window border. | |
91 set_shadow(views::BubbleBorder::NO_SHADOW); | |
92 | |
93 // Compensate for built-in vertical padding in the anchor view's image. | 89 // Compensate for built-in vertical padding in the anchor view's image. |
94 set_anchor_insets(gfx::Insets(5, 0, 5, 0)); | 90 set_anchor_insets(gfx::Insets(5, 0, 5, 0)); |
95 | 91 |
96 UMA_HISTOGRAM_COUNTS_100("DisabledExtension.SideloadWipeoutCount", | 92 UMA_HISTOGRAM_COUNTS_100("DisabledExtension.SideloadWipeoutCount", |
97 wiped_out->size()); | 93 wiped_out->size()); |
98 } | 94 } |
99 | 95 |
100 // static | 96 // static |
101 void DisabledExtensionsView::MaybeShow(Browser* browser, | 97 void DisabledExtensionsView::MaybeShow(Browser* browser, |
102 views::View* anchor_view) { | 98 views::View* anchor_view) { |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 384 } |
389 | 385 |
390 void DisabledExtensionsView::ViewHierarchyChanged(bool is_add, | 386 void DisabledExtensionsView::ViewHierarchyChanged(bool is_add, |
391 View* parent, | 387 View* parent, |
392 View* child) { | 388 View* child) { |
393 if (is_add && child == this) { | 389 if (is_add && child == this) { |
394 GetWidget()->NotifyAccessibilityEvent( | 390 GetWidget()->NotifyAccessibilityEvent( |
395 this, ui::AccessibilityTypes::EVENT_ALERT, true); | 391 this, ui::AccessibilityTypes::EVENT_ALERT, true); |
396 } | 392 } |
397 } | 393 } |
OLD | NEW |