summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/root_window.cc7
-rw-r--r--ui/aura/root_window.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 6c6d6bb..d3c99d7 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -159,6 +159,13 @@ RootWindow::~RootWindow() {
layer()->GetAnimator()->RemoveObserver(this);
}
+// static
+RootWindow* RootWindow::GetForAcceleratedWidget(
+ gfx::AcceleratedWidget widget) {
+ RootWindowHost* host = RootWindowHost::GetForAcceleratedWidget(widget);
+ return host ? host->GetRootWindow() : NULL;
+}
+
void RootWindow::Init() {
compositor()->SetScaleAndSize(GetDeviceScaleFactorFromMonitor(this),
host_->GetBounds().size());
diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h
index 2d13e76..4a9ac6a 100644
--- a/ui/aura/root_window.h
+++ b/ui/aura/root_window.h
@@ -84,6 +84,8 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate,
explicit RootWindow(const gfx::Rect& initial_bounds);
virtual ~RootWindow();
+ static RootWindow* GetForAcceleratedWidget(gfx::AcceleratedWidget widget);
+
static void set_hide_host_cursor(bool hide) {
hide_host_cursor_ = hide;
}