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

Unified Diff: ui/aura/root_window_host_win.cc

Issue 10241005: Make win_aura work without ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698