| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 state = windows::WINDOW_STATE_MINIMIZED; | 282 state = windows::WINDOW_STATE_MINIMIZED; |
| 283 break; | 283 break; |
| 284 case ui::SHOW_STATE_MAXIMIZED: | 284 case ui::SHOW_STATE_MAXIMIZED: |
| 285 state = windows::WINDOW_STATE_MAXIMIZED; | 285 state = windows::WINDOW_STATE_MAXIMIZED; |
| 286 break; | 286 break; |
| 287 case ui::SHOW_STATE_FULLSCREEN: | 287 case ui::SHOW_STATE_FULLSCREEN: |
| 288 state = windows::WINDOW_STATE_FULLSCREEN; | 288 state = windows::WINDOW_STATE_FULLSCREEN; |
| 289 break; | 289 break; |
| 290 case ui::SHOW_STATE_DEFAULT: | 290 case ui::SHOW_STATE_DEFAULT: |
| 291 case ui::SHOW_STATE_INACTIVE: | 291 case ui::SHOW_STATE_INACTIVE: |
| 292 case ui::SHOW_STATE_PREVIOUS: |
| 292 case ui::SHOW_STATE_END: | 293 case ui::SHOW_STATE_END: |
| 293 break; | 294 break; |
| 294 } | 295 } |
| 295 | 296 |
| 296 std::unique_ptr<windows::Window> window_struct( | 297 std::unique_ptr<windows::Window> window_struct( |
| 297 CreateWindowModelHelper(std::move(tabs), session_id, type, state)); | 298 CreateWindowModelHelper(std::move(tabs), session_id, type, state)); |
| 298 // TODO(dwankri): Dig deeper to resolve bounds not being optional, so closed | 299 // TODO(dwankri): Dig deeper to resolve bounds not being optional, so closed |
| 299 // windows in GetRecentlyClosed can have set values in Window helper. | 300 // windows in GetRecentlyClosed can have set values in Window helper. |
| 300 window_struct->left.reset(new int(window.bounds.x())); | 301 window_struct->left.reset(new int(window.bounds.x())); |
| 301 window_struct->top.reset(new int(window.bounds.y())); | 302 window_struct->top.reset(new int(window.bounds.y())); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 return g_factory.Pointer(); | 603 return g_factory.Pointer(); |
| 603 } | 604 } |
| 604 | 605 |
| 605 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { | 606 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { |
| 606 sessions_event_router_.reset( | 607 sessions_event_router_.reset( |
| 607 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); | 608 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); |
| 608 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 609 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
| 609 } | 610 } |
| 610 | 611 |
| 611 } // namespace extensions | 612 } // namespace extensions |
| OLD | NEW |