Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_UI_VIEWS_SYNC_ONE_CLICK_SIGNIN_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_SYNC_ONE_CLICK_SIGNIN_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_SYNC_ONE_CLICK_SIGNIN_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_SYNC_ONE_CLICK_SIGNIN_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 const BrowserWindow::StartSyncCallback& start_sync); | 46 const BrowserWindow::StartSyncCallback& start_sync); |
| 47 | 47 |
| 48 static bool IsShowing(); | 48 static bool IsShowing(); |
| 49 | 49 |
| 50 static void Hide(); | 50 static void Hide(); |
| 51 | 51 |
| 52 // Gets the global bubble view. If its not showing returns NULL. This | 52 // Gets the global bubble view. If its not showing returns NULL. This |
| 53 // method is meant to be called only from tests. | 53 // method is meant to be called only from tests. |
| 54 static OneClickSigninBubbleView* view_for_testing() { return bubble_view_; } | 54 static OneClickSigninBubbleView* view_for_testing() { return bubble_view_; } |
| 55 | 55 |
| 56 // We normally close the bubble any time it becomes inactive but this can lead | |
| 57 // to flaky tests where unexpected UI events are triggering this behavior. | |
| 58 // Tests should call this with "false" for more consistent operation. | |
| 59 // (crbug.com/266972) | |
| 60 static void set_close_on_deactivate_for_testing(bool close) { | |
|
fdoray
2013/08/09 18:22:42
The method is not called set_close_on_deactivate()
| |
| 61 close_on_deactivate_ = close; | |
| 62 } | |
| 63 | |
| 56 protected: | 64 protected: |
| 57 // Creates a OneClickSigninBubbleView. | 65 // Creates a OneClickSigninBubbleView. |
| 58 OneClickSigninBubbleView( | 66 OneClickSigninBubbleView( |
| 59 const string16& error_message, | 67 const string16& error_message, |
| 60 const string16& email, | 68 const string16& email, |
| 61 scoped_ptr<OneClickSigninBubbleDelegate> delegate, | 69 scoped_ptr<OneClickSigninBubbleDelegate> delegate, |
| 62 views::View* anchor_view, | 70 views::View* anchor_view, |
| 63 const BrowserWindow::StartSyncCallback& start_sync_callback, | 71 const BrowserWindow::StartSyncCallback& start_sync_callback, |
| 64 bool is_sync_dialog); | 72 bool is_sync_dialog); |
| 65 | 73 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 views::ImageButton* close_button_; | 149 views::ImageButton* close_button_; |
| 142 | 150 |
| 143 bool clicked_learn_more_; | 151 bool clicked_learn_more_; |
| 144 | 152 |
| 145 // A message loop used only with unit tests. | 153 // A message loop used only with unit tests. |
| 146 base::MessageLoop* message_loop_for_testing_; | 154 base::MessageLoop* message_loop_for_testing_; |
| 147 | 155 |
| 148 // The bubble, if we're showing one. | 156 // The bubble, if we're showing one. |
| 149 static OneClickSigninBubbleView* bubble_view_; | 157 static OneClickSigninBubbleView* bubble_view_; |
| 150 | 158 |
| 159 static bool close_on_deactivate_; | |
|
Roger Tawa OOO till Jul 10th
2013/08/09 18:55:10
Better to rename this variable so its not the same
| |
| 160 | |
| 151 DISALLOW_COPY_AND_ASSIGN(OneClickSigninBubbleView); | 161 DISALLOW_COPY_AND_ASSIGN(OneClickSigninBubbleView); |
| 152 }; | 162 }; |
| 153 | 163 |
| 154 #endif // CHROME_BROWSER_UI_VIEWS_SYNC_ONE_CLICK_SIGNIN_BUBBLE_VIEW_H_ | 164 #endif // CHROME_BROWSER_UI_VIEWS_SYNC_ONE_CLICK_SIGNIN_BUBBLE_VIEW_H_ |
| OLD | NEW |