Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: ui/views/bubble/tray_bubble_view.cc

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/bubble/tray_bubble_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/tray_bubble_view.cc
diff --git a/ui/views/bubble/tray_bubble_view.cc b/ui/views/bubble/tray_bubble_view.cc
index b990372eead013a834048c569a444af9721f14e2..059458a0e640905afbefea1919b82f3c47fa7a01 100644
--- a/ui/views/bubble/tray_bubble_view.cc
+++ b/ui/views/bubble/tray_bubble_view.cc
@@ -328,6 +328,7 @@ TrayBubbleView::TrayBubbleView(View* anchor,
owned_bubble_border_(bubble_border_),
is_gesture_dragging_(false),
mouse_actively_entered_(false) {
+ set_can_activate(params_.can_activate);
DCHECK(anchor_widget()); // Computed by BubbleDialogDelegateView().
set_notify_enter_exit_on_child(true);
set_close_on_deactivate(init_params.close_on_deactivate);
@@ -415,10 +416,6 @@ void TrayBubbleView::OnBeforeBubbleWidgetInit(Widget::InitParams* params,
delegate_->OnBeforeBubbleWidgetInit(anchor_widget(), bubble_widget, params);
}
-bool TrayBubbleView::CanActivate() const {
- return params_.can_activate;
-}
-
NonClientFrameView* TrayBubbleView::CreateNonClientFrameView(Widget* widget) {
BubbleFrameView* frame = static_cast<BubbleFrameView*>(
BubbleDialogDelegateView::CreateNonClientFrameView(widget));
@@ -493,7 +490,7 @@ void TrayBubbleView::OnMouseExited(const ui::MouseEvent& event) {
}
void TrayBubbleView::GetAccessibleState(ui::AXViewState* state) {
- if (delegate_ && params_.can_activate) {
+ if (delegate_ && CanActivate()) {
state->role = ui::AX_ROLE_WINDOW;
state->name = delegate_->GetAccessibleNameForBubble();
}
« no previous file with comments | « ui/views/bubble/tray_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698