| OLD | NEW |
| 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 COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ | 5 #ifndef COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ |
| 6 #define COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ | 6 #define COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 std::unique_ptr<SessionCommand>* command); | 89 std::unique_ptr<SessionCommand>* command); |
| 90 | 90 |
| 91 // Returns true if provided |command| either closes a window or a tab. | 91 // Returns true if provided |command| either closes a window or a tab. |
| 92 SESSIONS_EXPORT bool IsClosingCommand(SessionCommand* command); | 92 SESSIONS_EXPORT bool IsClosingCommand(SessionCommand* command); |
| 93 | 93 |
| 94 // Converts a list of commands into SessionWindows. On return any valid | 94 // Converts a list of commands into SessionWindows. On return any valid |
| 95 // windows are added to |valid_windows|. |active_window_id| will be set with the | 95 // windows are added to |valid_windows|. |active_window_id| will be set with the |
| 96 // id of the last active window, but it's only valid when this id corresponds | 96 // id of the last active window, but it's only valid when this id corresponds |
| 97 // to the id of one of the windows in |valid_windows|. | 97 // to the id of one of the windows in |valid_windows|. |
| 98 SESSIONS_EXPORT void RestoreSessionFromCommands( | 98 SESSIONS_EXPORT void RestoreSessionFromCommands( |
| 99 const ScopedVector<SessionCommand>& commands, | 99 const std::vector<std::unique_ptr<SessionCommand>>& commands, |
| 100 std::vector<std::unique_ptr<SessionWindow>>* valid_windows, | 100 std::vector<std::unique_ptr<SessionWindow>>* valid_windows, |
| 101 SessionID::id_type* active_window_id); | 101 SessionID::id_type* active_window_id); |
| 102 | 102 |
| 103 } // namespace sessions | 103 } // namespace sessions |
| 104 | 104 |
| 105 #endif // COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ | 105 #endif // COMPONENTS_SESSIONS_CORE_SESSION_SERVICE_COMMANDS_H_ |
| OLD | NEW |