| 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/history/history_service_factory.h" | 15 #include "ios/chrome/browser/history/history_service_factory.h" |
| 15 #include "ios/chrome/browser/sync/glue/sync_start_util.h" | 16 #include "ios/chrome/browser/sync/glue/sync_start_util.h" |
| 16 #include "ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h" | 17 #include "ios/chrome/browser/sync/ios_chrome_synced_tab_delegate.h" |
| 17 #include "ios/chrome/browser/tab_parenting_global_observer.h" | 18 #include "ios/chrome/browser/tab_parenting_global_observer.h" |
| 18 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 browser_sync::SyncedTabDelegate* GetSyncedTabDelegateFromWebState( | 22 browser_sync::SyncedTabDelegate* GetSyncedTabDelegateFromWebState( |
| 23 web::WebState* web_state) { | 23 web::WebState* web_state) { |
| 24 browser_sync::SyncedTabDelegate* delegate = | 24 browser_sync::SyncedTabDelegate* delegate = |
| 25 IOSChromeSyncedTabDelegate::FromWebState(web_state); | 25 IOSChromeSyncedTabDelegate::FromWebState(web_state); |
| 26 return delegate; | 26 return delegate; |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 void IOSChromeLocalSessionEventRouter::StartRoutingTo( | 114 void IOSChromeLocalSessionEventRouter::StartRoutingTo( |
| 115 browser_sync::LocalSessionEventHandler* handler) { | 115 browser_sync::LocalSessionEventHandler* handler) { |
| 116 DCHECK(!handler_); | 116 DCHECK(!handler_); |
| 117 handler_ = handler; | 117 handler_ = handler; |
| 118 } | 118 } |
| 119 | 119 |
| 120 void IOSChromeLocalSessionEventRouter::Stop() { | 120 void IOSChromeLocalSessionEventRouter::Stop() { |
| 121 handler_ = nullptr; | 121 handler_ = nullptr; |
| 122 } | 122 } |
| OLD | NEW |