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 COMPONENTS_SYNC_SESSIONS_OPEN_TABS_UI_DELEGATE_H_ | 5 #ifndef COMPONENTS_SYNC_SESSIONS_OPEN_TABS_UI_DELEGATE_H_ |
6 #define COMPONENTS_SYNC_SESSIONS_OPEN_TABS_UI_DELEGATE_H_ | 6 #define COMPONENTS_SYNC_SESSIONS_OPEN_TABS_UI_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/ref_counted_memory.h" | 12 #include "base/memory/ref_counted_memory.h" |
13 #include "components/sessions/core/session_id.h" | 13 #include "components/sessions/core/session_id.h" |
14 #include "components/sessions/core/session_types.h" | 14 #include "components/sessions/core/session_types.h" |
15 #include "components/sync_sessions/synced_session.h" | 15 #include "components/sync_sessions/synced_session.h" |
16 | 16 |
17 namespace sync_driver { | 17 namespace sync_sessions { |
18 | 18 |
19 class OpenTabsUIDelegate { | 19 class OpenTabsUIDelegate { |
20 public: | 20 public: |
21 // If a valid favicon for the page at |url| is found, fills |favicon_png| with | 21 // If a valid favicon for the page at |url| is found, fills |favicon_png| with |
22 // the png-encoded image and returns true. Else, returns false. | 22 // the png-encoded image and returns true. Else, returns false. |
23 virtual bool GetSyncedFaviconForPageURL( | 23 virtual bool GetSyncedFaviconForPageURL( |
24 const std::string& pageurl, | 24 const std::string& pageurl, |
25 scoped_refptr<base::RefCountedMemory>* favicon_png) const = 0; | 25 scoped_refptr<base::RefCountedMemory>* favicon_png) const = 0; |
26 | 26 |
27 // Builds a list of all foreign sessions, ordered from most recent to least | 27 // Builds a list of all foreign sessions, ordered from most recent to least |
(...skipping 29 matching lines...) Expand all Loading... |
57 std::vector<const sessions::SessionTab*>* tabs) = 0; | 57 std::vector<const sessions::SessionTab*>* tabs) = 0; |
58 | 58 |
59 // Sets |*local| to point to the sessions sync representation of the | 59 // Sets |*local| to point to the sessions sync representation of the |
60 // local machine. | 60 // local machine. |
61 virtual bool GetLocalSession(const SyncedSession** local) = 0; | 61 virtual bool GetLocalSession(const SyncedSession** local) = 0; |
62 | 62 |
63 protected: | 63 protected: |
64 virtual ~OpenTabsUIDelegate(); | 64 virtual ~OpenTabsUIDelegate(); |
65 }; | 65 }; |
66 | 66 |
67 } // namespace sync_driver | 67 } // namespace sync_sessions |
68 | 68 |
69 #endif // COMPONENTS_SYNC_SESSIONS_OPEN_TABS_UI_DELEGATE_H_ | 69 #endif // COMPONENTS_SYNC_SESSIONS_OPEN_TABS_UI_DELEGATE_H_ |
OLD | NEW |