Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / sync / sync_global_error.h
blob5437e0fc62eb15d2d46b27bf033812c2a47377fa
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_SYNC_GLOBAL_ERROR_H_
6 #define CHROME_BROWSER_SYNC_SYNC_GLOBAL_ERROR_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/profile_sync_service_observer.h"
11 #include "chrome/browser/ui/global_error/global_error.h"
13 class ProfileSyncService;
14 class SigninManagerBase;
16 // Shows sync errors on the wrench menu using a bubble view and a
17 // menu item.
18 class SyncGlobalError : public GlobalErrorWithStandardBubble,
19 public ProfileSyncServiceObserver {
20 public:
21 SyncGlobalError(ProfileSyncService* service, SigninManagerBase* signin);
22 virtual ~SyncGlobalError();
24 virtual bool HasMenuItem() OVERRIDE;
25 virtual int MenuItemCommandID() OVERRIDE;
26 virtual base::string16 MenuItemLabel() OVERRIDE;
27 virtual void ExecuteMenuItem(Browser* browser) OVERRIDE;
29 virtual bool HasBubbleView() OVERRIDE;
30 virtual base::string16 GetBubbleViewTitle() OVERRIDE;
31 virtual std::vector<base::string16> GetBubbleViewMessages() OVERRIDE;
32 virtual base::string16 GetBubbleViewAcceptButtonLabel() OVERRIDE;
33 virtual base::string16 GetBubbleViewCancelButtonLabel() OVERRIDE;
34 virtual void OnBubbleViewDidClose(Browser* browser) OVERRIDE;
35 virtual void BubbleViewAcceptButtonPressed(Browser* browser) OVERRIDE;
36 virtual void BubbleViewCancelButtonPressed(Browser* browser) OVERRIDE;
38 // ProfileSyncServiceObserver implementation.
39 virtual void OnStateChanged() OVERRIDE;
41 private:
42 base::string16 bubble_accept_label_;
43 base::string16 bubble_message_;
44 base::string16 menu_label_;
45 ProfileSyncService* service_;
46 SigninManagerBase* signin_;
48 DISALLOW_COPY_AND_ASSIGN(SyncGlobalError);
51 #endif // CHROME_BROWSER_SYNC_SYNC_GLOBAL_ERROR_H_