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

Side by Side Diff: chrome/browser/fullscreen_aurax11.cc

Issue 25108005: linux_aura: Compile ash into chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reupload to try off of ToT instead of LKGR Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/fullscreen.h" 5 #include "chrome/browser/fullscreen.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/root_window_controller.h"
10 #include "chrome/browser/ui/host_desktop.h"
9 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
10 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 12 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
11 #include "ui/views/widget/widget.h" 13 #include "ui/views/widget/widget.h"
12 14
13 bool IsFullScreenMode() { 15 bool IsFullScreenMode() {
16 #if defined(USE_ASH)
17 if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) {
18 ash::RootWindowController* controller =
19 ash::RootWindowController::ForTargetRootWindow();
20 return controller && controller->GetWindowForFullscreenMode();
21 }
22 #endif
23
14 std::vector<aura::Window*> all_windows = 24 std::vector<aura::Window*> all_windows =
15 views::DesktopWindowTreeHostX11::GetAllOpenWindows(); 25 views::DesktopWindowTreeHostX11::GetAllOpenWindows();
16 // Only the topmost window is checked. This works fine in the most cases, but 26 // Only the topmost window is checked. This works fine in the most cases, but
17 // it may return false when there are multiple displays and one display has 27 // it may return false when there are multiple displays and one display has
18 // a fullscreen window but others don't. See: crbug.com/345484 28 // a fullscreen window but others don't. See: crbug.com/345484
19 if (all_windows.empty()) 29 if (all_windows.empty())
20 return false; 30 return false;
21 31
22 views::Widget* widget = 32 views::Widget* widget =
23 views::Widget::GetWidgetForNativeWindow(all_windows[0]); 33 views::Widget::GetWidgetForNativeWindow(all_windows[0]);
24 return widget && widget->IsFullscreen(); 34 return widget && widget->IsFullscreen();
25 } 35 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/managed_mode/managed_user_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698