OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h" | 10 #include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h" |
11 #include "chrome/browser/ui/browser_list_observer.h" | 11 #include "chrome/browser/ui/browser_list_observer.h" |
12 #include "chrome/browser/ui/host_desktop.h" | 12 #include "chrome/browser/ui/host_desktop.h" |
13 | 13 |
14 class Browser; | 14 class Browser; |
15 class Profile; | 15 class Profile; |
16 | 16 |
17 // Delegate of the bookmark bubble to load the sign in page in a browser | 17 // Delegate of the bookmark bubble to load the sign in page in a browser |
18 // when the sign in link is clicked. | 18 // when the sign in link is clicked. |
19 class BookmarkBubbleSignInDelegate : public BookmarkBubbleDelegate, | 19 class BookmarkBubbleSignInDelegate : public BookmarkBubbleDelegate, |
20 public chrome::BrowserListObserver { | 20 public chrome::BrowserListObserver { |
21 public: | 21 public: |
22 explicit BookmarkBubbleSignInDelegate(Browser* browser); | 22 explicit BookmarkBubbleSignInDelegate(Browser* browser); |
23 | 23 |
24 private: | 24 private: |
25 virtual ~BookmarkBubbleSignInDelegate(); | 25 virtual ~BookmarkBubbleSignInDelegate(); |
26 | 26 |
27 // BookmarkBubbleDelegate: | 27 // BookmarkBubbleDelegate: |
28 virtual void OnSignInLinkClicked() OVERRIDE; | 28 virtual void OnSignInLinkClicked() override; |
29 | 29 |
30 // chrome::BrowserListObserver: | 30 // chrome::BrowserListObserver: |
31 virtual void OnBrowserRemoved(Browser* browser) OVERRIDE; | 31 virtual void OnBrowserRemoved(Browser* browser) override; |
32 | 32 |
33 // Makes sure |browser_| points to a valid browser. | 33 // Makes sure |browser_| points to a valid browser. |
34 void EnsureBrowser(); | 34 void EnsureBrowser(); |
35 | 35 |
36 // The browser in which the sign in page must be loaded. | 36 // The browser in which the sign in page must be loaded. |
37 Browser* browser_; | 37 Browser* browser_; |
38 | 38 |
39 // The profile associated with |browser_|. | 39 // The profile associated with |browser_|. |
40 Profile* profile_; | 40 Profile* profile_; |
41 | 41 |
42 // The host desktop of |browser_|. | 42 // The host desktop of |browser_|. |
43 chrome::HostDesktopType desktop_type_; | 43 chrome::HostDesktopType desktop_type_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleSignInDelegate); | 45 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleSignInDelegate); |
46 }; | 46 }; |
47 | 47 |
48 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_ | 48 #endif // CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_ |
OLD | NEW |