| Index: ui/aura/root_window_host_win.cc
|
| ===================================================================
|
| --- ui/aura/root_window_host_win.cc (revision 134107)
|
| +++ ui/aura/root_window_host_win.cc (working copy)
|
| @@ -12,6 +12,7 @@
|
| #include "ui/aura/env.h"
|
| #include "ui/aura/event.h"
|
| #include "ui/aura/root_window.h"
|
| +#include "ui/base/view_prop.h"
|
|
|
| using std::max;
|
| using std::min;
|
| @@ -20,6 +21,8 @@
|
|
|
| namespace {
|
|
|
| +const char* kRootWindowHostWinKey = "__AURA_ROOT_WINDOW_HOST_WIN__";
|
| +
|
| const wchar_t* GetCursorId(gfx::NativeCursor native_cursor) {
|
| switch (native_cursor.native_type()) {
|
| case ui::kCursorNull:
|
| @@ -108,6 +111,13 @@
|
| }
|
|
|
| // static
|
| +RootWindowHost* RootWindowHost::GetForAcceleratedWidget(
|
| + gfx::AcceleratedWidget accelerated_widget) {
|
| + return reinterpret_cast<RootWindowHost*>(
|
| + ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostWinKey));
|
| +}
|
| +
|
| +// static
|
| gfx::Size RootWindowHost::GetNativeScreenSize() {
|
| return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
|
| GetSystemMetrics(SM_CYSCREEN));
|
| @@ -121,6 +131,7 @@
|
| saved_window_ex_style_(0) {
|
| Init(NULL, bounds);
|
| SetWindowText(hwnd(), L"aura::RootWindow!");
|
| + prop_.reset(new ui::ViewProp(hwnd(), kRootWindowHostWinKey, this));
|
| }
|
|
|
| RootWindowHostWin::~RootWindowHostWin() {
|
| @@ -131,6 +142,10 @@
|
| root_window_ = root_window;
|
| }
|
|
|
| +RootWindow* RootWindowHostWin::GetRootWindow() {
|
| + return root_window_;
|
| +}
|
| +
|
| gfx::AcceleratedWidget RootWindowHostWin::GetAcceleratedWidget() {
|
| return hwnd();
|
| }
|
|
|