Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: chrome/browser/extensions/api/sessions/sessions_api.cc

Issue 1056793006: [Docking] Persists docked state on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Docking] Makes docked state persistent on Chrome OS (comments) Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/wm_types.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 type = windows::WINDOW_TYPE_NORMAL; 293 type = windows::WINDOW_TYPE_NORMAL;
294 break; 294 break;
295 case sessions::SessionWindow::TYPE_POPUP: 295 case sessions::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::WindowState state = windows::WINDOW_STATE_NONE; 300 windows::WindowState 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 case ui::SHOW_STATE_DOCKED:
303 state = windows::WINDOW_STATE_NORMAL; 304 state = windows::WINDOW_STATE_NORMAL;
304 break; 305 break;
305 case ui::SHOW_STATE_MINIMIZED: 306 case ui::SHOW_STATE_MINIMIZED:
306 state = windows::WINDOW_STATE_MINIMIZED; 307 state = windows::WINDOW_STATE_MINIMIZED;
307 break; 308 break;
308 case ui::SHOW_STATE_MAXIMIZED: 309 case ui::SHOW_STATE_MAXIMIZED:
309 state = windows::WINDOW_STATE_MAXIMIZED; 310 state = windows::WINDOW_STATE_MAXIMIZED;
310 break; 311 break;
311 case ui::SHOW_STATE_FULLSCREEN: 312 case ui::SHOW_STATE_FULLSCREEN:
312 state = windows::WINDOW_STATE_FULLSCREEN; 313 state = windows::WINDOW_STATE_FULLSCREEN;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 return g_factory.Pointer(); 649 return g_factory.Pointer();
649 } 650 }
650 651
651 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) { 652 void SessionsAPI::OnListenerAdded(const EventListenerInfo& details) {
652 sessions_event_router_.reset( 653 sessions_event_router_.reset(
653 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_))); 654 new SessionsEventRouter(Profile::FromBrowserContext(browser_context_)));
654 EventRouter::Get(browser_context_)->UnregisterObserver(this); 655 EventRouter::Get(browser_context_)->UnregisterObserver(this);
655 } 656 }
656 657
657 } // namespace extensions 658 } // namespace extensions
OLDNEW
« no previous file with comments | « ash/wm/wm_types.cc ('k') | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698