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

Side by Side Diff: chrome/browser/sessions/session_service_commands.h

Issue 694813003: Changing SessionService to have a BaseSessionService, not being one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser tests Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SESSIONS_SESSION_SERVICE_COMMANDS_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_COMMANDS_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_COMMANDS_H_ 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_COMMANDS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 scoped_ptr<SessionCommand> CreateSetTabExtensionAppIDCommand( 61 scoped_ptr<SessionCommand> CreateSetTabExtensionAppIDCommand(
62 const SessionID& tab_id, 62 const SessionID& tab_id,
63 const std::string& extension_id); 63 const std::string& extension_id);
64 scoped_ptr<SessionCommand> CreateSetTabUserAgentOverrideCommand( 64 scoped_ptr<SessionCommand> CreateSetTabUserAgentOverrideCommand(
65 const SessionID& tab_id, 65 const SessionID& tab_id,
66 const std::string& user_agent_override); 66 const std::string& user_agent_override);
67 scoped_ptr<SessionCommand> CreateSetWindowAppNameCommand( 67 scoped_ptr<SessionCommand> CreateSetWindowAppNameCommand(
68 const SessionID& window_id, 68 const SessionID& window_id,
69 const std::string& app_name); 69 const std::string& app_name);
70 70
71 // Searches for a pending command in |pending_commands| that can be replaced 71 // Searches for a pending command using |base_session_service| that can be
72 // with |command|. If one is found, pending command is removed, the command 72 // replaced with |command|. If one is found, pending command is removed, the
73 // is added to the pending commands (taken ownership) and true is returned. 73 // command is added to the pending commands (taken ownership) and true is
74 bool ReplacePendingCommand( 74 // returned.
75 ScopedVector<SessionCommand>& pending_commands, 75 bool ReplacePendingCommand(BaseSessionService* base_session_service,
76 scoped_ptr<SessionCommand>* command); 76 scoped_ptr<SessionCommand>* command);
77 77
78 // Returns true if provided |command| either closes a window or a tab. 78 // Returns true if provided |command| either closes a window or a tab.
79 bool IsClosingCommand(SessionCommand* command); 79 bool IsClosingCommand(SessionCommand* command);
80 80
81 // Converts a list of commands into SessionWindows. On return any valid 81 // Converts a list of commands into SessionWindows. On return any valid
82 // windows are added to valid_windows. It is up to the caller to delete 82 // windows are added to valid_windows. It is up to the caller to delete
83 // the windows added to valid_windows. |active_window_id| will be set with the 83 // the windows added to valid_windows. |active_window_id| will be set with the
84 // id of the last active window, but it's only valid when this id corresponds 84 // id of the last active window, but it's only valid when this id corresponds
85 // to the id of one of the windows in valid_windows. 85 // to the id of one of the windows in valid_windows.
86 void RestoreSessionFromCommands(const ScopedVector<SessionCommand>& commands, 86 void RestoreSessionFromCommands(const ScopedVector<SessionCommand>& commands,
87 std::vector<SessionWindow*>* valid_windows, 87 std::vector<SessionWindow*>* valid_windows,
88 SessionID::id_type* active_window_id); 88 SessionID::id_type* active_window_id);
89 89
90 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_COMMANDS_H_ 90 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_COMMANDS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/sessions/session_service_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698