summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-26 19:20:28 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-26 19:20:28 +0000
commit40c15eb2c9d846fe70502e1f50ff7c2d6cb4ff67 (patch)
treeab9417f1e5345354ca8a5b47f3876536a87d297c /ui/base
parentfdede0fc51e8b8801a861f76d1a9d6d7c329a69d (diff)
downloadchromium_src-40c15eb2c9d846fe70502e1f50ff7c2d6cb4ff67.zip
chromium_src-40c15eb2c9d846fe70502e1f50ff7c2d6cb4ff67.tar.gz
chromium_src-40c15eb2c9d846fe70502e1f50ff7c2d6cb4ff67.tar.bz2
Make views_examples work in aura without ash.
This required a ScreenImpl implementation for windows+aura. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10241005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/view_prop.cc10
-rw-r--r--ui/base/view_prop.h8
-rw-r--r--ui/base/view_prop_unittest.cc4
3 files changed, 11 insertions, 11 deletions
diff --git a/ui/base/view_prop.cc b/ui/base/view_prop.cc
index 119228f..cb58553 100644
--- a/ui/base/view_prop.cc
+++ b/ui/base/view_prop.cc
@@ -13,7 +13,7 @@ class ViewProp::Data : public base::RefCounted<ViewProp::Data> {
public:
// Returns the Data* for the view/key pair. If |create| is false and |Get|
// has not been invoked for the view/key pair, NULL is returned.
- static void Get(gfx::NativeView view,
+ static void Get(gfx::AcceleratedWidget view,
const char* key,
bool create,
scoped_refptr<Data>* data) {
@@ -51,7 +51,7 @@ class ViewProp::Data : public base::RefCounted<ViewProp::Data> {
typedef std::set<Data*, DataComparator> DataSet;
- Data(gfx::NativeView view, const char* key)
+ Data(gfx::AcceleratedWidget view, const char* key)
: view_(view),
key_(key),
data_(NULL) {}
@@ -67,7 +67,7 @@ class ViewProp::Data : public base::RefCounted<ViewProp::Data> {
// The existing set of Data is stored here. ~Data removes from the set.
static DataSet* data_set_;
- const gfx::NativeView view_;
+ const gfx::AcceleratedWidget view_;
const char* key_;
void* data_;
@@ -77,7 +77,7 @@ class ViewProp::Data : public base::RefCounted<ViewProp::Data> {
// static
ViewProp::Data::DataSet* ViewProp::Data::data_set_ = NULL;
-ViewProp::ViewProp(gfx::NativeView view, const char* key, void* data) {
+ViewProp::ViewProp(gfx::AcceleratedWidget view, const char* key, void* data) {
Data::Get(view, key, true, &data_);
data_->set_data(data);
}
@@ -89,7 +89,7 @@ ViewProp::~ViewProp() {
}
// static
-void* ViewProp::GetValue(gfx::NativeView view, const char* key) {
+void* ViewProp::GetValue(gfx::AcceleratedWidget view, const char* key) {
scoped_refptr<Data> data;
Data::Get(view, key, false, &data);
return data.get() ? data->data() : NULL;
diff --git a/ui/base/view_prop.h b/ui/base/view_prop.h
index 055601c..68b8561 100644
--- a/ui/base/view_prop.h
+++ b/ui/base/view_prop.h
@@ -11,8 +11,8 @@
#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
-#if defined(USE_AURA) || defined(OS_LINUX) || defined(OS_MACOSX)
-#error view_prop.h is only for win, non aura build
+#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_AURA))
+#error view_prop.h is only for windows and aura builds.
#endif
namespace ui {
@@ -28,12 +28,12 @@ class UI_EXPORT ViewProp {
//
// ViewProp does *not* make a copy of the char*, the pointer is used for
// sorting.
- ViewProp(gfx::NativeView view, const char* key, void* data);
+ ViewProp(gfx::AcceleratedWidget view, const char* key, void* data);
~ViewProp();
// Returns the value associated with the view/key pair, or NULL if there is
// none.
- static void* GetValue(gfx::NativeView view, const char* key);
+ static void* GetValue(gfx::AcceleratedWidget view, const char* key);
// Returns the key.
const char* Key() const;
diff --git a/ui/base/view_prop_unittest.cc b/ui/base/view_prop_unittest.cc
index 49046d8..d369c94 100644
--- a/ui/base/view_prop_unittest.cc
+++ b/ui/base/view_prop_unittest.cc
@@ -16,8 +16,8 @@ namespace ui {
// Test a handful of viewprop assertions.
TEST(ViewPropTest, Basic) {
- gfx::NativeView nv1 = reinterpret_cast<gfx::NativeView>(1);
- gfx::NativeView nv2 = reinterpret_cast<gfx::NativeView>(2);
+ gfx::AcceleratedWidget nv1 = reinterpret_cast<gfx::AcceleratedWidget>(1);
+ gfx::AcceleratedWidget nv2 = reinterpret_cast<gfx::AcceleratedWidget>(2);
void* data1 = reinterpret_cast<void*>(11);
void* data2 = reinterpret_cast<void*>(12);