summaryrefslogtreecommitdiffstats
path: root/ui/aura/root_window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/aura/root_window.cc')
-rw-r--r--ui/aura/root_window.cc7
1 files changed, 7 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());