| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/ui/global_error/global_error.h" | 12 #include "chrome/browser/ui/global_error/global_error.h" |
| 13 | 13 |
| 14 class GlobalErrorBubbleViewBase; | 14 class GlobalErrorBubbleViewBase; |
| 15 class GlobalErrorService; | 15 class GlobalErrorService; |
| 16 | 16 |
| 17 // Encapsulates UI-related functionality for the software removal tool (SRT) | 17 // Encapsulates UI-related functionality for the software removal tool (SRT) |
| 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 being a GlobalError). | 19 // and (2.) a menu item in the wrench menu (provided by being a GlobalError). |
| 20 class SRTGlobalError : public GlobalErrorWithStandardBubble, | 20 class SRTGlobalError : public GlobalErrorWithStandardBubble, |
| 21 public base::SupportsWeakPtr<SRTGlobalError> { | 21 public base::SupportsWeakPtr<SRTGlobalError> { |
| 22 public: | 22 public: |
| 23 explicit SRTGlobalError(GlobalErrorService* global_error_service); | 23 explicit SRTGlobalError(GlobalErrorService* global_error_service); |
| 24 virtual ~SRTGlobalError(); | 24 virtual ~SRTGlobalError(); |
| 25 | 25 |
| 26 // GlobalError: | 26 // GlobalError: |
| 27 virtual bool HasMenuItem() OVERRIDE; | 27 virtual bool HasMenuItem() override; |
| 28 virtual int MenuItemCommandID() OVERRIDE; | 28 virtual int MenuItemCommandID() override; |
| 29 virtual base::string16 MenuItemLabel() OVERRIDE; | 29 virtual base::string16 MenuItemLabel() override; |
| 30 virtual void ExecuteMenuItem(Browser* browser) OVERRIDE; | 30 virtual void ExecuteMenuItem(Browser* browser) override; |
| 31 virtual void ShowBubbleView(Browser* browser) OVERRIDE; | 31 virtual void ShowBubbleView(Browser* browser) override; |
| 32 | 32 |
| 33 // GlobalErrorWithStandardBubble. | 33 // GlobalErrorWithStandardBubble. |
| 34 virtual base::string16 GetBubbleViewTitle() OVERRIDE; | 34 virtual base::string16 GetBubbleViewTitle() override; |
| 35 virtual std::vector<base::string16> GetBubbleViewMessages() OVERRIDE; | 35 virtual std::vector<base::string16> GetBubbleViewMessages() override; |
| 36 virtual base::string16 GetBubbleViewAcceptButtonLabel() OVERRIDE; | 36 virtual base::string16 GetBubbleViewAcceptButtonLabel() override; |
| 37 virtual base::string16 GetBubbleViewCancelButtonLabel() OVERRIDE; | 37 virtual base::string16 GetBubbleViewCancelButtonLabel() override; |
| 38 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE; | 38 virtual void OnBubbleViewDidClose(Browser* browser) override; |
| 39 virtual void BubbleViewAcceptButtonPressed(Browser* browser) OVERRIDE; | 39 virtual void BubbleViewAcceptButtonPressed(Browser* browser) override; |
| 40 virtual void BubbleViewCancelButtonPressed(Browser* browser) OVERRIDE; | 40 virtual void BubbleViewCancelButtonPressed(Browser* browser) override; |
| 41 virtual bool ShouldCloseOnDeactivate() const OVERRIDE; | 41 virtual bool ShouldCloseOnDeactivate() const override; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 // When the user took action, the GlobalError can be dismissed. | 44 // When the user took action, the GlobalError can be dismissed. |
| 45 void DismissGlobalError(); | 45 void DismissGlobalError(); |
| 46 | 46 |
| 47 // Used to dismiss the GlobalError, then set to NULL. | 47 // Used to dismiss the GlobalError, then set to NULL. |
| 48 GlobalErrorService* global_error_service_; | 48 GlobalErrorService* global_error_service_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(SRTGlobalError); | 50 DISALLOW_COPY_AND_ASSIGN(SRTGlobalError); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ | 53 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ |
| OLD | NEW |