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

Side by Side Diff: chrome/browser/ui/views/avatar_menu_bubble_view.h

Issue 51113006: Fix static set_close_on_deactivate overriding non-virtual base method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change function prototype from set_close_on_deactivate_for_testing(bool close) to clear_close_on_de… Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 virtual void Init() OVERRIDE; 75 virtual void Init() OVERRIDE;
76 virtual void WindowClosing() OVERRIDE; 76 virtual void WindowClosing() OVERRIDE;
77 77
78 // AvatarMenuObserver implementation. 78 // AvatarMenuObserver implementation.
79 virtual void OnAvatarMenuChanged( 79 virtual void OnAvatarMenuChanged(
80 AvatarMenu* avatar_menu) OVERRIDE; 80 AvatarMenu* avatar_menu) OVERRIDE;
81 81
82 // We normally close the bubble any time it becomes inactive but this can lead 82 // We normally close the bubble any time it becomes inactive but this can lead
83 // to flaky tests where unexpected UI events are triggering this behavior. 83 // to flaky tests where unexpected UI events are triggering this behavior.
84 // Tests should call this with "false" for more consistent operation. 84 // Tests should call this with "false" for more consistent operation.
85 static void set_close_on_deactivate(bool close) { 85 static void clear_close_on_deactivate_for_testing() {
86 close_on_deactivate_ = close; 86 close_on_deactivate_for_testing_ = false;
87 } 87 }
88 88
89 private: 89 private:
90 AvatarMenuBubbleView(views::View* anchor_view, 90 AvatarMenuBubbleView(views::View* anchor_view,
91 views::BubbleBorder::Arrow arrow, 91 views::BubbleBorder::Arrow arrow,
92 const gfx::Rect& anchor_rect, 92 const gfx::Rect& anchor_rect,
93 Browser* browser); 93 Browser* browser);
94 94
95 // Sets the colors on all the |item_views_|. Called after the 95 // Sets the colors on all the |item_views_|. Called after the
96 // BubbleDelegateView is created and has loaded the colors from the 96 // BubbleDelegateView is created and has loaded the colors from the
(...skipping 21 matching lines...) Expand all
118 118
119 // This will be non-NULL if and only if |expanded_| is false and 119 // This will be non-NULL if and only if |expanded_| is false and
120 // avatar_menu_->GetManagedUserInformation() returns a non-empty string. 120 // avatar_menu_->GetManagedUserInformation() returns a non-empty string.
121 // See OnAvatarMenuChanged(). 121 // See OnAvatarMenuChanged().
122 views::Label* managed_user_info_; 122 views::Label* managed_user_info_;
123 views::ImageView* icon_view_; 123 views::ImageView* icon_view_;
124 views::Separator* separator_switch_users_; 124 views::Separator* separator_switch_users_;
125 views::Link* switch_profile_link_; 125 views::Link* switch_profile_link_;
126 126
127 static AvatarMenuBubbleView* avatar_bubble_; 127 static AvatarMenuBubbleView* avatar_bubble_;
128 static bool close_on_deactivate_; 128 static bool close_on_deactivate_for_testing_;
129 129
130 // Is set to true if the managed user has clicked on Switch Users. 130 // Is set to true if the managed user has clicked on Switch Users.
131 bool expanded_; 131 bool expanded_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); 133 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView);
134 }; 134 };
135 135
136 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ 136 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698