| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/api/sessions/sessions_api.h" | 5 #include "chrome/browser/extensions/api/sessions/sessions_api.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 tabs->push_back(make_linked_ptr( | 282 tabs->push_back(make_linked_ptr( |
| 283 CreateTabModel(session_tag, *tabs_in_window[i], i, | 283 CreateTabModel(session_tag, *tabs_in_window[i], i, |
| 284 window.selected_tab_index).release())); | 284 window.selected_tab_index).release())); |
| 285 } | 285 } |
| 286 | 286 |
| 287 std::string session_id = | 287 std::string session_id = |
| 288 SessionId(session_tag, window.window_id.id()).ToString(); | 288 SessionId(session_tag, window.window_id.id()).ToString(); |
| 289 | 289 |
| 290 windows::Window::Type type = windows::Window::TYPE_NONE; | 290 windows::Window::Type type = windows::Window::TYPE_NONE; |
| 291 switch (window.type) { | 291 switch (window.type) { |
| 292 case Browser::TYPE_TABBED: | 292 case SessionWindow::TYPE_TABBED: |
| 293 type = windows::Window::TYPE_NORMAL; | 293 type = windows::Window::TYPE_NORMAL; |
| 294 break; | 294 break; |
| 295 case Browser::TYPE_POPUP: | 295 case SessionWindow::TYPE_POPUP: |
| 296 type = windows::Window::TYPE_POPUP; | 296 type = windows::Window::TYPE_POPUP; |
| 297 break; | 297 break; |
| 298 } | 298 } |
| 299 | 299 |
| 300 windows::Window::State state = windows::Window::STATE_NONE; | 300 windows::Window::State state = windows::Window::STATE_NONE; |
| 301 switch (window.show_state) { | 301 switch (window.show_state) { |
| 302 case ui::SHOW_STATE_NORMAL: | 302 case ui::SHOW_STATE_NORMAL: |
| 303 state = windows::Window::STATE_NORMAL; | 303 state = windows::Window::STATE_NORMAL; |
| 304 break; | 304 break; |
| 305 case ui::SHOW_STATE_MINIMIZED: | 305 case ui::SHOW_STATE_MINIMIZED: |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 return g_factory.Pointer(); | 647 return g_factory.Pointer(); |
| 648 } | 648 } |
| 649 | 649 |
| 650 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { | 650 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { |
| 651 sessions_event_router_.reset( | 651 sessions_event_router_.reset( |
| 652 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); | 652 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); |
| 653 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 653 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
| 654 } | 654 } |
| 655 | 655 |
| 656 } // namespace extensions | 656 } // namespace extensions |
| OLD | NEW |