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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h

Issue 18603006: Bookmark sync promo for Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test for CrOS Created 7 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
Index: chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h
diff --git a/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h b/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..88e39441bc70df01ef10f1c74415280e182125f8
--- /dev/null
+++ b/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h
@@ -0,0 +1,48 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_
+#define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h"
+#include "chrome/browser/ui/browser_list_observer.h"
+#include "chrome/browser/ui/host_desktop.h"
+
+class Browser;
+class Profile;
+
+// Delegate of the bookmark bubble to load the sign in page in a browser
+// when the sign in link is clicked.
+class BookmarkBubbleSignInDelegate : public BookmarkBubbleDelegate,
+ public chrome::BrowserListObserver {
+ public:
+ explicit BookmarkBubbleSignInDelegate(Browser* browser);
+
+ private:
+ virtual ~BookmarkBubbleSignInDelegate();
+
+ // BookmarkBubbleDelegate:
+ virtual void OnSignInLinkClicked() OVERRIDE;
+
+ // chrome::BrowserListObserver:
+ virtual void OnBrowserRemoved(Browser* browser) OVERRIDE;
+
+ // Makes sure |browser_| points to a valid browser.
+ void EnsureBrowser();
+
+ // The browser in which the sign in page must be loaded.
+ Browser* browser_;
+
+ // The profile associated with |browser_|.
+ Profile* profile_;
+
+ // The host desktop of |browser_|.
+ chrome::HostDesktopType desktop_type_;
+
+ DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleSignInDelegate);
+};
+
+#endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698