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

Unified Diff: chrome/browser/ui/webui/ntp/foreign_session_handler.h

Issue 9959030: Allow hiding of sessions from Other Devices via context menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/ntp/foreign_session_handler.h
diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.h b/chrome/browser/ui/webui/ntp/foreign_session_handler.h
index b57e8cf409d8ca49f60a87d0101d1d737a6f24c8..9d123cb546db04fa1aa45c90d6a9e2bbbd9f73b7 100644
--- a/chrome/browser/ui/webui/ntp/foreign_session_handler.h
+++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.h
@@ -8,6 +8,7 @@
#include <vector>
+#include "base/time.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/glue/session_model_associator.h"
#include "content/public/browser/notification_observer.h"
@@ -40,6 +41,9 @@ class ForeignSessionHandler : public content::WebUIMessageHandler,
// Returns true if tab sync is enabled for this profile, otherwise false.
bool IsTabSyncEnabled();
+ // Returns a string used to show the user when a session was last modified.
+ string16 FormatSessionTime(const base::Time& time);
+
// Determines which session is to be opened, and then calls
// OpenForeignSession, to begin the process of opening a new browser window.
// This is a javascript callback handler.
@@ -50,6 +54,12 @@ class ForeignSessionHandler : public content::WebUIMessageHandler,
// model has changed and the new tab page needs to reflect the changes.
void HandleGetForeignSessions(const ListValue* args);
+ // Delete a foreign session. This will remove it from the list of foreign
+ // sessions on all devices. It will reappear if the session is re-activated
+ // on the original device.
+ // This is a javascript callback handler.
+ void HandleDeleteForeignSession(const ListValue* args);
+
// Helper methods to create JSON compatible objects from Session objects.
bool SessionTabToValue(const SessionTab& tab, DictionaryValue* dictionary);
bool SessionWindowToValue(const SessionWindow& window,
« 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