| 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_EXTENSIONS_APP_NOTIFY_CHANNEL_UI_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_UI_H_ | 
| 6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_UI_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_UI_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
| 26     NO_INFOBAR, | 26     NO_INFOBAR, | 
| 27 | 27 | 
| 28     // Ask if the app can show notifications. | 28     // Ask if the app can show notifications. | 
| 29     NOTIFICATION_INFOBAR, | 29     NOTIFICATION_INFOBAR, | 
| 30   }; | 30   }; | 
| 31 | 31 | 
| 32   class Delegate { | 32   class Delegate { | 
| 33    public: | 33    public: | 
| 34     // A callback for whether the user successfully set up sync or not. | 34     // A callback for whether the user successfully set up sync or not. | 
| 35     virtual void OnSyncSetupResult(bool enabled) = 0; | 35     virtual void OnSyncSetupResult(bool enabled) = 0; | 
|  | 36 | 
|  | 37    protected: | 
|  | 38     virtual ~Delegate() {} | 
| 36   }; | 39   }; | 
| 37 | 40 | 
| 38   // Shows a prompt for sync setup - |delegate| will be called back later when | 41   // Shows a prompt for sync setup - |delegate| will be called back later when | 
| 39   // setup is complete or cancelled. This should only be called once per | 42   // setup is complete or cancelled. This should only be called once per | 
| 40   // instance. | 43   // instance. | 
| 41   virtual void PromptSyncSetup(Delegate* delegate) = 0; | 44   virtual void PromptSyncSetup(Delegate* delegate) = 0; | 
| 42 }; | 45 }; | 
| 43 | 46 | 
| 44 | 47 | 
| 45 class AppNotifyChannelUIImpl : public AppNotifyChannelUI, | 48 class AppNotifyChannelUIImpl : public AppNotifyChannelUI, | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 84   // after ShowLoginDialog is called and before the wizard is | 87   // after ShowLoginDialog is called and before the wizard is | 
| 85   // actually visible to the user. So we record if the wizard was | 88   // actually visible to the user. So we record if the wizard was | 
| 86   // shown to user and then wait for wizard to get dismissed. | 89   // shown to user and then wait for wizard to get dismissed. | 
| 87   // See crbug.com/101842. | 90   // See crbug.com/101842. | 
| 88   bool wizard_shown_to_user_; | 91   bool wizard_shown_to_user_; | 
| 89 | 92 | 
| 90   DISALLOW_COPY_AND_ASSIGN(AppNotifyChannelUIImpl); | 93   DISALLOW_COPY_AND_ASSIGN(AppNotifyChannelUIImpl); | 
| 91 }; | 94 }; | 
| 92 | 95 | 
| 93 #endif  // CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_UI_H_ | 96 #endif  // CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_UI_H_ | 
| OLD | NEW | 
|---|