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

Side by Side Diff: chrome/browser/ui/aura/active_desktop_monitor.cc

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/aura/tabs/dock_info_auralinux.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 "chrome/browser/ui/aura/active_desktop_monitor.h" 5 #include "chrome/browser/ui/aura/active_desktop_monitor.h"
6 6
7 #include "ui/aura/env.h" 7 #include "ui/aura/env.h"
8 #include "ui/aura/root_window.h" 8 #include "ui/aura/root_window.h"
9 9
10 #if defined(USE_X11) 10 #if defined(USE_X11)
(...skipping 26 matching lines...) Expand all
37 chrome::HOST_DESKTOP_TYPE_NATIVE; 37 chrome::HOST_DESKTOP_TYPE_NATIVE;
38 } 38 }
39 39
40 // static 40 // static
41 bool ActiveDesktopMonitor::IsDesktopWindow(aura::RootWindow* root_window) { 41 bool ActiveDesktopMonitor::IsDesktopWindow(aura::RootWindow* root_window) {
42 // Only windows hosted by a DesktopRootWindowHost implementation can be mapped 42 // Only windows hosted by a DesktopRootWindowHost implementation can be mapped
43 // back to a content Window. All others, therefore, must be the root window 43 // back to a content Window. All others, therefore, must be the root window
44 // for an Ash display. 44 // for an Ash display.
45 #if defined(OS_WIN) 45 #if defined(OS_WIN)
46 return views::DesktopRootWindowHostWin::GetContentWindowForHWND( 46 return views::DesktopRootWindowHostWin::GetContentWindowForHWND(
47 root_window->GetAcceleratedWidget()) != NULL; 47 root_window->host()->GetAcceleratedWidget()) != NULL;
48 #elif defined(USE_X11) 48 #elif defined(USE_X11)
49 return views::DesktopRootWindowHostX11::GetContentWindowForXID( 49 return views::DesktopRootWindowHostX11::GetContentWindowForXID(
50 root_window->GetAcceleratedWidget()) != NULL; 50 root_window->host()->GetAcceleratedWidget()) != NULL;
51 #else 51 #else
52 NOTREACHED(); 52 NOTREACHED();
53 return true; 53 return true;
54 #endif 54 #endif
55 } 55 }
56 56
57 void ActiveDesktopMonitor::OnWindowInitialized(aura::Window* window) {} 57 void ActiveDesktopMonitor::OnWindowInitialized(aura::Window* window) {}
58 58
59 void ActiveDesktopMonitor::OnRootWindowActivated( 59 void ActiveDesktopMonitor::OnRootWindowActivated(
60 aura::RootWindow* root_window) { 60 aura::RootWindow* root_window) {
61 if (IsDesktopWindow(root_window)) 61 if (IsDesktopWindow(root_window))
62 last_activated_desktop_ = chrome::HOST_DESKTOP_TYPE_NATIVE; 62 last_activated_desktop_ = chrome::HOST_DESKTOP_TYPE_NATIVE;
63 else 63 else
64 last_activated_desktop_ = chrome::HOST_DESKTOP_TYPE_ASH; 64 last_activated_desktop_ = chrome::HOST_DESKTOP_TYPE_ASH;
65 DVLOG(1) << __FUNCTION__ 65 DVLOG(1) << __FUNCTION__
66 << (last_activated_desktop_ == chrome::HOST_DESKTOP_TYPE_NATIVE ? 66 << (last_activated_desktop_ == chrome::HOST_DESKTOP_TYPE_NATIVE ?
67 " native" : " ash") << " desktop activated."; 67 " native" : " ash") << " desktop activated.";
68 } 68 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/aura/tabs/dock_info_auralinux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698