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 #import "ios/chrome/browser/sessions/session_window.h" | 5 #import "ios/chrome/browser/sessions/session_window.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #import "base/mac/scoped_nsobject.h" | 13 #import "base/mac/scoped_nsobject.h" |
14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
15 #import "ios/chrome/browser/sessions/NSCoder+Compatibility.h" | 15 #import "ios/chrome/browser/sessions/NSCoder+Compatibility.h" |
16 #import "ios/chrome/browser/sessions/session_service.h" | 16 #import "ios/chrome/browser/sessions/session_service.h" |
17 #import "ios/web/navigation/crw_session_controller.h" | |
18 #import "ios/web/public/web_thread.h" | 17 #import "ios/web/public/web_thread.h" |
19 #import "ios/web/web_state/web_state_impl.h" | 18 #import "ios/web/web_state/web_state_impl.h" |
20 | 19 |
21 using web::WebStateImpl; | 20 using web::WebStateImpl; |
22 | 21 |
23 // Serialization keys. | 22 // Serialization keys. |
24 NSString* const kSessionsKey = @"sessions"; | 23 NSString* const kSessionsKey = @"sessions"; |
25 NSString* const kSelectedIndexKey = @"selectedIndex"; | 24 NSString* const kSelectedIndexKey = @"selectedIndex"; |
26 | 25 |
27 @interface SessionWindowIOS () { | 26 @interface SessionWindowIOS () { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 (!sessionCount && index == NSNotFound); | 109 (!sessionCount && index == NSNotFound); |
111 } | 110 } |
112 | 111 |
113 - (NSString*)description { | 112 - (NSString*)description { |
114 return [NSString stringWithFormat:@"selected index: %" PRIuNS | 113 return [NSString stringWithFormat:@"selected index: %" PRIuNS |
115 "\nsessions:\n%@\n", | 114 "\nsessions:\n%@\n", |
116 _selectedIndex, _sessions.get()]; | 115 _selectedIndex, _sessions.get()]; |
117 } | 116 } |
118 | 117 |
119 @end | 118 @end |
OLD | NEW |