| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/dom_ui/foreign_session_handler.h" | 5 #include "chrome/browser/dom_ui/foreign_session_handler.h" |
| 6 | 6 |
| 7 #include "base/scoped_vector.h" | 7 #include "base/scoped_vector.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser.h" | |
| 10 #include "chrome/browser/dom_ui/value_helper.h" | 9 #include "chrome/browser/dom_ui/value_helper.h" |
| 11 #include "chrome/browser/sessions/session_restore.h" | 10 #include "chrome/browser/sessions/session_restore.h" |
| 12 #include "chrome/browser/sessions/tab_restore_service.h" | 11 #include "chrome/browser/sessions/tab_restore_service.h" |
| 13 #include "chrome/browser/sync/engine/syncapi.h" | 12 #include "chrome/browser/sync/engine/syncapi.h" |
| 14 #include "chrome/browser/sync/profile_sync_service.h" | 13 #include "chrome/browser/sync/profile_sync_service.h" |
| 15 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
| 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/common/notification_details.h" | 16 #include "chrome/common/notification_details.h" |
| 17 #include "chrome/common/notification_service.h" | 17 #include "chrome/common/notification_service.h" |
| 18 | 18 |
| 19 namespace browser_sync { | 19 namespace browser_sync { |
| 20 | 20 |
| 21 static const int kMaxSessionsToShow = 10; | 21 static const int kMaxSessionsToShow = 10; |
| 22 | 22 |
| 23 ForeignSessionHandler::ForeignSessionHandler() { | 23 ForeignSessionHandler::ForeignSessionHandler() { |
| 24 Init(); | 24 Init(); |
| 25 } | 25 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 151 } |
| 152 added_count++; | 152 added_count++; |
| 153 | 153 |
| 154 // Give ownership to |client_list| | 154 // Give ownership to |client_list| |
| 155 client_list.Append(window_list.release()); | 155 client_list.Append(window_list.release()); |
| 156 } | 156 } |
| 157 dom_ui_->CallJavascriptFunction(L"foreignSessions", client_list); | 157 dom_ui_->CallJavascriptFunction(L"foreignSessions", client_list); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace browser_sync | 160 } // namespace browser_sync |
| OLD | NEW |