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

Unified Diff: chrome/browser/extensions/app_notify_channel_ui.h

Issue 10700202: Add Android stub implementation for AppNotifyChannelUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a Create method to the interface Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/app_notify_channel_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_notify_channel_ui.h
diff --git a/chrome/browser/extensions/app_notify_channel_ui.h b/chrome/browser/extensions/app_notify_channel_ui.h
index fa5d275b94eb96dd56290199be8256c2b31985f4..42b76235d49824329754550a0e6f15abb765e992 100644
--- a/chrome/browser/extensions/app_notify_channel_ui.h
+++ b/chrome/browser/extensions/app_notify_channel_ui.h
@@ -7,10 +7,6 @@
#include <string>
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "chrome/browser/sync/profile_sync_service_observer.h"
-
class Profile;
class TabContents;
@@ -42,55 +38,12 @@ class AppNotifyChannelUI {
// setup is complete or cancelled. This should only be called once per
// instance.
virtual void PromptSyncSetup(Delegate* delegate) = 0;
-};
-
-
-class AppNotifyChannelUIImpl : public AppNotifyChannelUI,
- public ProfileSyncServiceObserver {
- public:
- AppNotifyChannelUIImpl(Profile* profile,
- TabContents* tab_contents,
- const std::string& app_name,
- AppNotifyChannelUI::UIType ui_type);
- virtual ~AppNotifyChannelUIImpl();
-
- // AppNotifyChannelUI.
- virtual void PromptSyncSetup(AppNotifyChannelUI::Delegate* delegate) OVERRIDE;
-
- protected:
- // A private class we use to put up an infobar - its lifetime is managed by
- // |tab_contents_|, so we don't have one as an instance variable.
- class InfoBar;
- friend class AppNotifyChannelUIImpl::InfoBar;
-
- // Called by our InfoBar when it's accepted or cancelled/closed.
- void OnInfoBarResult(bool accepted);
-
- // ProfileSyncServiceObserver.
- virtual void OnStateChanged() OVERRIDE;
-
- private:
- void StartObservingSync();
- void StopObservingSync();
-
- Profile* profile_;
- TabContents* tab_contents_;
- std::string app_name_;
- AppNotifyChannelUI::UIType ui_type_;
- AppNotifyChannelUI::Delegate* delegate_;
-
- // Have we registered ourself as a ProfileSyncServiceObserver?
- bool observing_sync_;
-
- // This is for working around a bug that ProfileSyncService calls
- // ProfileSyncServiceObserver::OnStateChanged callback many times
- // after ShowLoginDialog is called and before the wizard is
- // actually visible to the user. So we record if the wizard was
- // shown to user and then wait for wizard to get dismissed.
- // See crbug.com/101842.
- bool wizard_shown_to_user_;
- DISALLOW_COPY_AND_ASSIGN(AppNotifyChannelUIImpl);
+ // Builds the platform specific AppNotifyChannelUI.
+ static AppNotifyChannelUI* Create(Profile* profile,
+ TabContents* tab_contents,
+ const std::string& app_name,
+ AppNotifyChannelUI::UIType ui_type);
};
#endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFY_CHANNEL_UI_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/app_notify_channel_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698