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

Side by Side Diff: chrome/browser/profile_resetter/profile_reset_global_error.h

Issue 841163002: MacViews: Fix duplicate ShowSessionCrashBubble and ShowProfileResetBubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keybinding
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PROFILE_RESETTER_PROFILE_RESET_GLOBAL_ERROR_H_ 5 #ifndef CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESET_GLOBAL_ERROR_H_
6 #define CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESET_GLOBAL_ERROR_H_ 6 #define CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESET_GLOBAL_ERROR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/timer/elapsed_timer.h" 10 #include "base/timer/elapsed_timer.h"
11 #include "chrome/browser/ui/global_error/global_error.h" 11 #include "chrome/browser/ui/global_error/global_error.h"
12 12
13 class AutomaticProfileResetter; 13 class AutomaticProfileResetter;
14 class GlobalErrorBubbleViewBase; 14 class GlobalErrorBubbleViewBase;
15 class Profile; 15 class Profile;
16 16
17 // Encapsulates UI-related functionality for the one-time profile settings reset 17 // Encapsulates UI-related functionality for the one-time profile settings reset
18 // prompt. The UI consists of two parts: (1.) the profile reset (pop-up) bubble, 18 // prompt. The UI consists of two parts: (1.) the profile reset (pop-up) bubble,
19 // and (2.) a menu item in the wrench menu (provided by us being a GlobalError). 19 // and (2.) a menu item in the wrench menu (provided by us being a GlobalError).
20 class ProfileResetGlobalError 20 class ProfileResetGlobalError
21 : public GlobalError, 21 : public GlobalError,
22 public base::SupportsWeakPtr<ProfileResetGlobalError> { 22 public base::SupportsWeakPtr<ProfileResetGlobalError> {
23 public: 23 public:
24 explicit ProfileResetGlobalError(Profile* profile); 24 explicit ProfileResetGlobalError(Profile* profile);
25 ~ProfileResetGlobalError() override; 25 ~ProfileResetGlobalError() override;
26 26
27 // Returns whether or not the reset prompt is supported on this platform. 27 // Returns whether or not the reset prompt is supported on this platform.
28 static bool IsSupportedOnPlatform(); 28 static bool IsSupportedOnPlatform(Browser* browser);
29 29
30 // Called by the bubble view when it is closed. 30 // Called by the bubble view when it is closed.
31 void OnBubbleViewDidClose(); 31 void OnBubbleViewDidClose();
32 32
33 // Called when the user clicks on the 'Reset' button. The user can choose to 33 // Called when the user clicks on the 'Reset' button. The user can choose to
34 // send feedback containing the old settings that are now being reset, this is 34 // send feedback containing the old settings that are now being reset, this is
35 // indicated by |send_feedback|. 35 // indicated by |send_feedback|.
36 void OnBubbleViewResetButtonPressed(bool send_feedback); 36 void OnBubbleViewResetButtonPressed(bool send_feedback);
37 37
38 // Called when the user clicks the 'No, thanks' button. 38 // Called when the user clicks the 'No, thanks' button.
(...skipping 24 matching lines...) Expand all
63 // Whether or not we have already shown the bubble. 63 // Whether or not we have already shown the bubble.
64 bool has_shown_bubble_view_; 64 bool has_shown_bubble_view_;
65 65
66 // The reset bubble, if we're currently showing one. 66 // The reset bubble, if we're currently showing one.
67 GlobalErrorBubbleViewBase* bubble_view_; 67 GlobalErrorBubbleViewBase* bubble_view_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(ProfileResetGlobalError); 69 DISALLOW_COPY_AND_ASSIGN(ProfileResetGlobalError);
70 }; 70 };
71 71
72 #endif // CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESET_GLOBAL_ERROR_H_ 72 #endif // CHROME_BROWSER_PROFILE_RESETTER_PROFILE_RESET_GLOBAL_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698