OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ios/chrome/browser/sync/sessions/ios_chrome_local_session_event_router
.h" | 5 #include "ios/chrome/browser/sync/sessions/ios_chrome_local_session_event_router
.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "components/history/core/browser/history_service.h" | 10 #include "components/history/core/browser/history_service.h" |
11 #include "components/keyed_service/core/service_access_type.h" | 11 #include "components/keyed_service/core/service_access_type.h" |
12 #include "components/sync_sessions/sync_sessions_client.h" | 12 #include "components/sync_sessions/sync_sessions_client.h" |
13 #include "components/sync_sessions/synced_tab_delegate.h" | 13 #include "components/sync_sessions/synced_tab_delegate.h" |
14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 14 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
15 #include "ios/chrome/browser/history/history_service_factory.h" | 15 #include "ios/chrome/browser/history/history_service_factory.h" |
16 #include "ios/chrome/browser/sync/glue/sync_start_util.h" | 16 #include "ios/chrome/browser/sync/glue/sync_start_util.h" |
17 #include "ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h" | 17 #include "ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h" |
18 #include "ios/chrome/browser/tab_parenting_global_observer.h" | 18 #include "ios/chrome/browser/tab_parenting_global_observer.h" |
19 | 19 |
| 20 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 21 #error "This file requires ARC support." |
| 22 #endif |
| 23 |
20 namespace { | 24 namespace { |
21 | 25 |
22 sync_sessions::SyncedTabDelegate* GetSyncedTabDelegateFromWebState( | 26 sync_sessions::SyncedTabDelegate* GetSyncedTabDelegateFromWebState( |
23 web::WebState* web_state) { | 27 web::WebState* web_state) { |
24 sync_sessions::SyncedTabDelegate* delegate = | 28 sync_sessions::SyncedTabDelegate* delegate = |
25 IOSChromeSyncedTabDelegate::FromWebState(web_state); | 29 IOSChromeSyncedTabDelegate::FromWebState(web_state); |
26 return delegate; | 30 return delegate; |
27 } | 31 } |
28 | 32 |
29 } // namespace | 33 } // namespace |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 117 |
114 void IOSChromeLocalSessionEventRouter::StartRoutingTo( | 118 void IOSChromeLocalSessionEventRouter::StartRoutingTo( |
115 sync_sessions::LocalSessionEventHandler* handler) { | 119 sync_sessions::LocalSessionEventHandler* handler) { |
116 DCHECK(!handler_); | 120 DCHECK(!handler_); |
117 handler_ = handler; | 121 handler_ = handler; |
118 } | 122 } |
119 | 123 |
120 void IOSChromeLocalSessionEventRouter::Stop() { | 124 void IOSChromeLocalSessionEventRouter::Stop() { |
121 handler_ = nullptr; | 125 handler_ = nullptr; |
122 } | 126 } |
OLD | NEW |