OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_WEBUI_FOREIGN_SESSION_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const std::string& session_string_value, | 51 const std::string& session_string_value, |
52 SessionID::id_type window_num); | 52 SessionID::id_type window_num); |
53 | 53 |
54 // Returns a pointer to the current session model associator or NULL. | 54 // Returns a pointer to the current session model associator or NULL. |
55 static sync_sessions::OpenTabsUIDelegate* GetOpenTabsUIDelegate( | 55 static sync_sessions::OpenTabsUIDelegate* GetOpenTabsUIDelegate( |
56 content::WebUI* web_ui); | 56 content::WebUI* web_ui); |
57 | 57 |
58 private: | 58 private: |
59 // syncer::SyncServiceObserver: | 59 // syncer::SyncServiceObserver: |
60 void OnStateChanged() override {} | 60 void OnStateChanged() override {} |
61 void OnSyncConfigurationCompleted() override; | 61 void OnSyncConfigurationCompleted(syncer::SyncService* sync) override; |
62 void OnForeignSessionUpdated() override; | 62 void OnForeignSessionUpdated() override; |
63 | 63 |
64 // Returns a string used to show the user when a session was last modified. | 64 // Returns a string used to show the user when a session was last modified. |
65 base::string16 FormatSessionTime(const base::Time& time); | 65 base::string16 FormatSessionTime(const base::Time& time); |
66 | 66 |
67 // Determines which session is to be opened, and then calls | 67 // Determines which session is to be opened, and then calls |
68 // OpenForeignSession, to begin the process of opening a new browser window. | 68 // OpenForeignSession, to begin the process of opening a new browser window. |
69 // This is a javascript callback handler. | 69 // This is a javascript callback handler. |
70 void HandleOpenForeignSession(const base::ListValue* args); | 70 void HandleOpenForeignSession(const base::ListValue* args); |
71 | 71 |
(...skipping 17 matching lines...) Expand all Loading... |
89 // The time at which this WebUI was created. Used to calculate how long | 89 // The time at which this WebUI was created. Used to calculate how long |
90 // the WebUI was present before the sessions data was visible. | 90 // the WebUI was present before the sessions data was visible. |
91 base::TimeTicks load_attempt_time_; | 91 base::TimeTicks load_attempt_time_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler); | 93 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace browser_sync | 96 } // namespace browser_sync |
97 | 97 |
98 #endif // CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ | 98 #endif // CHROME_BROWSER_UI_WEBUI_FOREIGN_SESSION_HANDLER_H_ |
OLD | NEW |