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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 8771015: Rename Desktop->RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/tooltip_manager_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
===================================================================
--- ui/views/widget/native_widget_aura.cc (revision 113260)
+++ ui/views/widget/native_widget_aura.cc (working copy)
@@ -9,9 +9,9 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/drag_drop_client.h"
#include "ui/aura/client/shadow_types.h"
-#include "ui/aura/desktop.h"
-#include "ui/aura/desktop_observer.h"
#include "ui/aura/event.h"
+#include "ui/aura/root_window.h"
+#include "ui/aura/root_window_observer.h"
#include "ui/aura/window.h"
#include "ui/aura/window_types.h"
#include "ui/base/dragdrop/os_exchange_data.h"
@@ -64,18 +64,19 @@
// Used when SetInactiveRenderingDisabled() is invoked to track when active
// status changes in such a way that we should enable inactive rendering.
-class NativeWidgetAura::DesktopObserverImpl : public aura::DesktopObserver {
+class NativeWidgetAura::RootWindowObserverImpl
+ : public aura::RootWindowObserver {
public:
- explicit DesktopObserverImpl(NativeWidgetAura* host)
+ explicit RootWindowObserverImpl(NativeWidgetAura* host)
: host_(host) {
- aura::Desktop::GetInstance()->AddObserver(this);
+ aura::RootWindow::GetInstance()->AddObserver(this);
}
- virtual ~DesktopObserverImpl() {
- aura::Desktop::GetInstance()->RemoveObserver(this);
+ virtual ~RootWindowObserverImpl() {
+ aura::RootWindow::GetInstance()->RemoveObserver(this);
}
- // DesktopObserver overrides:
+ // RootWindowObserver overrides:
virtual void OnActiveWindowChanged(aura::Window* active) OVERRIDE {
if (!active || (active != host_->window_ &&
active->transient_parent() != host_->window_)) {
@@ -86,7 +87,7 @@
private:
NativeWidgetAura* host_;
- DISALLOW_COPY_AND_ASSIGN(DesktopObserverImpl);
+ DISALLOW_COPY_AND_ASSIGN(RootWindowObserverImpl);
};
////////////////////////////////////////////////////////////////////////////////
@@ -428,7 +429,7 @@
}
bool NativeWidgetAura::IsActive() const {
- return aura::Desktop::GetInstance()->active_window() == window_;
+ return aura::RootWindow::GetInstance()->active_window() == window_;
}
void NativeWidgetAura::SetAlwaysOnTop(bool on_top) {
@@ -487,8 +488,8 @@
const ui::OSExchangeData& data,
int operation) {
aura::DragDropClient* client = static_cast<aura::DragDropClient*>(
- aura::Desktop::GetInstance()->GetProperty(
- aura::kDesktopDragDropClientKey));
+ aura::RootWindow::GetInstance()->GetProperty(
+ aura::kRootWindowDragDropClientKey));
if (client)
client->StartDragAndDrop(data, operation);
}
@@ -500,7 +501,7 @@
void NativeWidgetAura::SetCursor(gfx::NativeCursor cursor) {
cursor_ = cursor;
- aura::Desktop::GetInstance()->SetCursor(cursor);
+ aura::RootWindow::GetInstance()->SetCursor(cursor);
}
void NativeWidgetAura::ClearNativeFocus() {
@@ -518,9 +519,9 @@
void NativeWidgetAura::SetInactiveRenderingDisabled(bool value) {
if (!value)
- desktop_observer_.reset();
+ root_window_observer_.reset();
else
- desktop_observer_.reset(new DesktopObserverImpl(this));
+ root_window_observer_.reset(new RootWindowObserverImpl(this));
}
////////////////////////////////////////////////////////////////////////////////
@@ -791,7 +792,7 @@
// static
bool NativeWidgetPrivate::IsMouseButtonDown() {
- return aura::Desktop::GetInstance()->IsMouseButtonDown();
+ return aura::RootWindow::GetInstance()->IsMouseButtonDown();
}
} // namespace internal
« no previous file with comments | « ui/views/widget/native_widget_aura.h ('k') | ui/views/widget/tooltip_manager_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698