blob: ad30bbfa3a4105ab4647ed3050dec8cc628a4b49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// 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/compiler_specific.h"
#include "base/macros.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/sync/bubble_sync_promo_delegate.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 BubbleSyncPromoDelegate,
public chrome::BrowserListObserver {
public:
explicit BookmarkBubbleSignInDelegate(Browser* browser);
private:
~BookmarkBubbleSignInDelegate() override;
// BubbleSyncPromoDelegate:
void OnSignInLinkClicked() override;
// chrome::BrowserListObserver:
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_;
DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleSignInDelegate);
};
#endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_
|