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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 type = windows::WINDOW_TYPE_NORMAL; | 268 type = windows::WINDOW_TYPE_NORMAL; |
269 break; | 269 break; |
270 case sessions::SessionWindow::TYPE_POPUP: | 270 case sessions::SessionWindow::TYPE_POPUP: |
271 type = windows::WINDOW_TYPE_POPUP; | 271 type = windows::WINDOW_TYPE_POPUP; |
272 break; | 272 break; |
273 } | 273 } |
274 | 274 |
275 windows::WindowState state = windows::WINDOW_STATE_NONE; | 275 windows::WindowState state = windows::WINDOW_STATE_NONE; |
276 switch (window.show_state) { | 276 switch (window.show_state) { |
277 case ui::SHOW_STATE_NORMAL: | 277 case ui::SHOW_STATE_NORMAL: |
278 | |
279 // TODO(afakhry): Remove Docked Windows in M58. | |
280 case ui::SHOW_STATE_DOCKED: | |
281 state = windows::WINDOW_STATE_NORMAL; | 278 state = windows::WINDOW_STATE_NORMAL; |
282 break; | 279 break; |
283 case ui::SHOW_STATE_MINIMIZED: | 280 case ui::SHOW_STATE_MINIMIZED: |
284 state = windows::WINDOW_STATE_MINIMIZED; | 281 state = windows::WINDOW_STATE_MINIMIZED; |
285 break; | 282 break; |
286 case ui::SHOW_STATE_MAXIMIZED: | 283 case ui::SHOW_STATE_MAXIMIZED: |
287 state = windows::WINDOW_STATE_MAXIMIZED; | 284 state = windows::WINDOW_STATE_MAXIMIZED; |
288 break; | 285 break; |
289 case ui::SHOW_STATE_FULLSCREEN: | 286 case ui::SHOW_STATE_FULLSCREEN: |
290 state = windows::WINDOW_STATE_FULLSCREEN; | 287 state = windows::WINDOW_STATE_FULLSCREEN; |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 return g_factory.Pointer(); | 601 return g_factory.Pointer(); |
605 } | 602 } |
606 | 603 |
607 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { | 604 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { |
608 sessions_event_router_.reset( | 605 sessions_event_router_.reset( |
609 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); | 606 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); |
610 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 607 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
611 } | 608 } |
612 | 609 |
613 } // namespace extensions | 610 } // namespace extensions |
OLD | NEW |