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

Side by Side Diff: ash/root_window_controller.cc

Issue 23534049: RootWindowController::GetFullscreenWindow() should return the active one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_constants.h" 10 #include "ash/ash_constants.h"
(...skipping 27 matching lines...) Expand all
38 #include "ash/wm/stacking_controller.h" 38 #include "ash/wm/stacking_controller.h"
39 #include "ash/wm/status_area_layout_manager.h" 39 #include "ash/wm/status_area_layout_manager.h"
40 #include "ash/wm/system_background_controller.h" 40 #include "ash/wm/system_background_controller.h"
41 #include "ash/wm/system_modal_container_layout_manager.h" 41 #include "ash/wm/system_modal_container_layout_manager.h"
42 #include "ash/wm/toplevel_window_event_handler.h" 42 #include "ash/wm/toplevel_window_event_handler.h"
43 #include "ash/wm/window_properties.h" 43 #include "ash/wm/window_properties.h"
44 #include "ash/wm/window_util.h" 44 #include "ash/wm/window_util.h"
45 #include "ash/wm/workspace_controller.h" 45 #include "ash/wm/workspace_controller.h"
46 #include "base/command_line.h" 46 #include "base/command_line.h"
47 #include "base/time/time.h" 47 #include "base/time/time.h"
48 #include "ui/aura/client/activation_client.h"
48 #include "ui/aura/client/aura_constants.h" 49 #include "ui/aura/client/aura_constants.h"
49 #include "ui/aura/client/drag_drop_client.h" 50 #include "ui/aura/client/drag_drop_client.h"
50 #include "ui/aura/client/tooltip_client.h" 51 #include "ui/aura/client/tooltip_client.h"
51 #include "ui/aura/root_window.h" 52 #include "ui/aura/root_window.h"
52 #include "ui/aura/window.h" 53 #include "ui/aura/window.h"
53 #include "ui/aura/window_delegate.h" 54 #include "ui/aura/window_delegate.h"
54 #include "ui/aura/window_observer.h" 55 #include "ui/aura/window_observer.h"
55 #include "ui/aura/window_tracker.h" 56 #include "ui/aura/window_tracker.h"
56 #include "ui/base/hit_test.h" 57 #include "ui/base/hit_test.h"
57 #include "ui/base/models/menu_model.h" 58 #include "ui/base/models/menu_model.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 } 496 }
496 497
497 Shell::GetInstance()->UpdateShelfVisibility(); 498 Shell::GetInstance()->UpdateShelfVisibility();
498 } 499 }
499 500
500 void RootWindowController::UpdateShelfVisibility() { 501 void RootWindowController::UpdateShelfVisibility() {
501 shelf_->shelf_layout_manager()->UpdateVisibilityState(); 502 shelf_->shelf_layout_manager()->UpdateVisibilityState();
502 } 503 }
503 504
504 const aura::Window* RootWindowController::GetFullscreenWindow() const { 505 const aura::Window* RootWindowController::GetFullscreenWindow() const {
506 aura::Window* active_window =
507 aura::client::GetActivationClient(root_window_.get())->GetActiveWindow();
508 if (active_window && wm::IsWindowFullscreen(active_window))
509 return active_window;
510
505 const aura::Window* container = GetContainer(kShellWindowId_DefaultContainer); 511 const aura::Window* container = GetContainer(kShellWindowId_DefaultContainer);
506 for (size_t i = 0; i < container->children().size(); ++i) { 512 for (size_t i = 0; i < container->children().size(); ++i) {
507 aura::Window* child = container->children()[i]; 513 aura::Window* child = container->children()[i];
508 if (wm::IsWindowFullscreen(child)) 514 if (wm::IsWindowFullscreen(child))
509 return child; 515 return child;
oshima 2013/09/04 23:45:55 Given that multiple fullscreen / immersive windows
Jun Mukai 2013/09/05 00:04:09 Done.
510 } 516 }
511 return NULL; 517 return NULL;
512 } 518 }
513 519
514 void RootWindowController::InitKeyboard() { 520 void RootWindowController::InitKeyboard() {
515 if (keyboard::IsKeyboardEnabled()) { 521 if (keyboard::IsKeyboardEnabled()) {
516 aura::Window* parent = root_window(); 522 aura::Window* parent = root_window();
517 523
518 keyboard::KeyboardControllerProxy* proxy = 524 keyboard::KeyboardControllerProxy* proxy =
519 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy(); 525 Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy();
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 814
809 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { 815 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) {
810 if (enabled) 816 if (enabled)
811 EnableTouchHudProjection(); 817 EnableTouchHudProjection();
812 else 818 else
813 DisableTouchHudProjection(); 819 DisableTouchHudProjection();
814 } 820 }
815 821
816 } // namespace internal 822 } // namespace internal
817 } // namespace ash 823 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698