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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 tabs->push_back(make_linked_ptr( | 278 tabs->push_back(make_linked_ptr( |
279 CreateTabModel(session_tag, *tabs_in_window[i], i, | 279 CreateTabModel(session_tag, *tabs_in_window[i], i, |
280 window.selected_tab_index).release())); | 280 window.selected_tab_index).release())); |
281 } | 281 } |
282 | 282 |
283 std::string session_id = | 283 std::string session_id = |
284 SessionId(session_tag, window.window_id.id()).ToString(); | 284 SessionId(session_tag, window.window_id.id()).ToString(); |
285 | 285 |
286 windows::Window::Type type = windows::Window::TYPE_NONE; | 286 windows::Window::Type type = windows::Window::TYPE_NONE; |
287 switch (window.type) { | 287 switch (window.type) { |
288 case Browser::TYPE_TABBED: | 288 case SessionWindow::TYPE_TABBED: // TODO(skuhne) Check Browser::TYPE_TABBED |
Mr4D (OOO till 08-26)
2014/10/23 20:09:10
I did go over all uses of WindowSession::type (whi
| |
289 type = windows::Window::TYPE_NORMAL; | 289 type = windows::Window::TYPE_NORMAL; |
290 break; | 290 break; |
291 case Browser::TYPE_POPUP: | 291 case SessionWindow::TYPE_POPUP: // TODO(skuhne): Check Browser::TYPE_POPUP: |
292 type = windows::Window::TYPE_POPUP; | 292 type = windows::Window::TYPE_POPUP; |
293 break; | 293 break; |
294 } | 294 } |
295 | 295 |
296 windows::Window::State state = windows::Window::STATE_NONE; | 296 windows::Window::State state = windows::Window::STATE_NONE; |
297 switch (window.show_state) { | 297 switch (window.show_state) { |
298 case ui::SHOW_STATE_NORMAL: | 298 case ui::SHOW_STATE_NORMAL: |
299 state = windows::Window::STATE_NORMAL; | 299 state = windows::Window::STATE_NORMAL; |
300 break; | 300 break; |
301 case ui::SHOW_STATE_MINIMIZED: | 301 case ui::SHOW_STATE_MINIMIZED: |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
643 return g_factory.Pointer(); | 643 return g_factory.Pointer(); |
644 } | 644 } |
645 | 645 |
646 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { | 646 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { |
647 sessions_event_router_.reset( | 647 sessions_event_router_.reset( |
648 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); | 648 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); |
649 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 649 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
650 } | 650 } |
651 | 651 |
652 } // namespace extensions | 652 } // namespace extensions |
OLD | NEW |