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

Side by Side Diff: chrome/browser/safe_browsing/srt_global_error.h

Issue 599653002: SRT Bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Working Version Created 6 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/global_error/global_error.h"
13
14 class GlobalErrorBubbleViewBase;
15 class GlobalErrorService;
16
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,
19 // and (2.) a menu item in the wrench menu (provided by being a GlobalError).
20 class SRTGlobalError : public GlobalErrorWithStandardBubble,
21 public base::SupportsWeakPtr<SRTGlobalError> {
22 public:
23 explicit SRTGlobalError(GlobalErrorService* global_error_service);
24 virtual ~SRTGlobalError();
25
26 // Returns whether or not the SRT prompt is supported on this platform.
27 static bool IsSupportedOnPlatform();
28
29 // GlobalError:
30 virtual bool HasMenuItem() OVERRIDE;
31 virtual int MenuItemCommandID() OVERRIDE;
32 virtual base::string16 MenuItemLabel() OVERRIDE;
33 virtual void ExecuteMenuItem(Browser* browser) OVERRIDE;
34 virtual void ShowBubbleView(Browser* browser) OVERRIDE;
35
36 // GlobalErrorWithStandardBubble.
37 virtual base::string16 GetBubbleViewTitle() OVERRIDE;
38 virtual std::vector<base::string16> GetBubbleViewMessages() OVERRIDE;
39 virtual base::string16 GetBubbleViewAcceptButtonLabel() OVERRIDE;
40 virtual base::string16 GetBubbleViewCancelButtonLabel() OVERRIDE;
41 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE;
42 virtual void BubbleViewAcceptButtonPressed(Browser* browser) OVERRIDE;
43 virtual void BubbleViewCancelButtonPressed(Browser* browser) OVERRIDE;
44
45 private:
46 // When the user took action, the GlobalError can be dismissed.
47 void DismissGlobalError();
48
49 // Used to dismiss the GlobalError, then set to NULL.
50 GlobalErrorService* global_error_service_;
51
52 DISALLOW_COPY_AND_ASSIGN(SRTGlobalError);
53 };
54
55 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698