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

Side by Side Diff: chrome/browser/ui/webui/ntp/foreign_session_handler.h

Issue 9838064: Add a sign-in promo message to the Other Devices menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright header. Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_NTP_FOREIGN_SESSION_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_FOREIGN_SESSION_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_FOREIGN_SESSION_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_FOREIGN_SESSION_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "chrome/browser/sessions/session_service.h" 11 #include "chrome/browser/sessions/session_service.h"
(...skipping 18 matching lines...) Expand all
30 void Init(); 30 void Init();
31 31
32 // Determines how ForeignSessionHandler will interact with the new tab page. 32 // Determines how ForeignSessionHandler will interact with the new tab page.
33 virtual void Observe(int type, 33 virtual void Observe(int type,
34 const content::NotificationSource& source, 34 const content::NotificationSource& source,
35 const content::NotificationDetails& details) OVERRIDE; 35 const content::NotificationDetails& details) OVERRIDE;
36 36
37 // Returns a pointer to the current session model associator or NULL. 37 // Returns a pointer to the current session model associator or NULL.
38 SessionModelAssociator* GetModelAssociator(); 38 SessionModelAssociator* GetModelAssociator();
39 39
40 // Returns true if tab sync is enabled for this profile, otherwise false.
41 bool IsTabSyncEnabled();
42
40 // Determines which session is to be opened, and then calls 43 // Determines which session is to be opened, and then calls
41 // OpenForeignSession, to begin the process of opening a new browser window. 44 // OpenForeignSession, to begin the process of opening a new browser window.
42 // This is a javascript callback handler. 45 // This is a javascript callback handler.
43 void HandleOpenForeignSession(const ListValue* args); 46 void HandleOpenForeignSession(const ListValue* args);
44 47
45 // Determines whether foreign sessions should be obtained from the sync model. 48 // Determines whether foreign sessions should be obtained from the sync model.
46 // This is a javascript callback handler, and it is also called when the sync 49 // This is a javascript callback handler, and it is also called when the sync
47 // model has changed and the new tab page needs to reflect the changes. 50 // model has changed and the new tab page needs to reflect the changes.
48 void HandleGetForeignSessions(const ListValue* args); 51 void HandleGetForeignSessions(const ListValue* args);
49 52
50 // Helper methods to create JSON compatible objects from Session objects. 53 // Helper methods to create JSON compatible objects from Session objects.
51 bool SessionTabToValue(const SessionTab& tab, DictionaryValue* dictionary); 54 bool SessionTabToValue(const SessionTab& tab, DictionaryValue* dictionary);
52 bool SessionWindowToValue(const SessionWindow& window, 55 bool SessionWindowToValue(const SessionWindow& window,
53 DictionaryValue* dictionary); 56 DictionaryValue* dictionary);
54 57
55 // The Registrar used to register ForeignSessionHandler for notifications. 58 // The Registrar used to register ForeignSessionHandler for notifications.
56 content::NotificationRegistrar registrar_; 59 content::NotificationRegistrar registrar_;
57 60
58 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler); 61 DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler);
59 }; 62 };
60 63
61 } // namespace browser_sync 64 } // namespace browser_sync
62 65
63 #endif // CHROME_BROWSER_UI_WEBUI_NTP_FOREIGN_SESSION_HANDLER_H_ 66 #endif // CHROME_BROWSER_UI_WEBUI_NTP_FOREIGN_SESSION_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/other_sessions.js ('k') | chrome/browser/ui/webui/ntp/foreign_session_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698