diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 00:07:53 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 00:07:53 +0000 |
commit | 1e55cc910f25c8af743d5941ccdffd836bdf1de6 (patch) | |
tree | c1b5ad6e7026abcf88998619ed48d93c5a7a1cfa /views/widget | |
parent | d5c14067f0153540b6f6f0f7a807b5f77b6877d6 (diff) | |
download | chromium_src-1e55cc910f25c8af743d5941ccdffd836bdf1de6.zip chromium_src-1e55cc910f25c8af743d5941ccdffd836bdf1de6.tar.gz chromium_src-1e55cc910f25c8af743d5941ccdffd836bdf1de6.tar.bz2 |
Move view property implmentation from NativeWidgetAura to window.
BUG=none
TEST=tbw
Review URL: http://codereview.chromium.org/8395039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107477 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/native_widget_aura.cc | 22 | ||||
-rw-r--r-- | views/widget/native_widget_aura.h | 8 |
2 files changed, 3 insertions, 27 deletions
diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc index b1a1c41..2113872f 100644 --- a/views/widget/native_widget_aura.cc +++ b/views/widget/native_widget_aura.cc @@ -9,7 +9,6 @@ #include "ui/aura/event.h" #include "ui/aura/window.h" #include "ui/aura/window_types.h" -#include "ui/base/view_prop.h" #include "ui/base/ui_base_types.h" #include "ui/gfx/canvas.h" #include "ui/gfx/compositor/layer.h" @@ -29,8 +28,6 @@ #include "views/ime/mock_input_method.h" #endif -using ui::ViewProp; - namespace views { const char* const NativeWidgetAura::kWindowTypeKey = "WindowType"; @@ -164,24 +161,12 @@ void NativeWidgetAura::ViewRemoved(View* view) { } void NativeWidgetAura::SetNativeWindowProperty(const char* name, void* value) { - // TODO(sky): push this to Widget when we get rid of NativeWidgetGtk. - if (!window_) - return; - - // Remove the existing property (if any). - for (ViewProps::iterator i = props_.begin(); i != props_.end(); ++i) { - if ((*i)->Key() == name) { - props_.erase(i); - break; - } - } - - if (value) - props_.push_back(new ViewProp(window_, name, value)); + if (window_) + window_->SetProperty(name, value); } void* NativeWidgetAura::GetNativeWindowProperty(const char* name) const { - return window_ ? ViewProp::GetValue(window_, name) : NULL; + return window_ ? window_->GetProperty(name) : NULL; } TooltipManager* NativeWidgetAura::GetTooltipManager() const { @@ -550,7 +535,6 @@ void NativeWidgetAura::OnWindowDestroying() { } void NativeWidgetAura::OnWindowDestroyed() { - props_.reset(); window_ = NULL; delegate_->OnNativeWidgetDestroyed(); if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) diff --git a/views/widget/native_widget_aura.h b/views/widget/native_widget_aura.h index 255b123..3cf65e2 100644 --- a/views/widget/native_widget_aura.h +++ b/views/widget/native_widget_aura.h @@ -20,10 +20,6 @@ namespace gfx { class Font; } -namespace ui { -class ViewProp; -} - namespace views { class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, @@ -147,8 +143,6 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, static const char* const kWindowTypeKey; private: - typedef ScopedVector<ui::ViewProp> ViewProps; - internal::NativeWidgetDelegate* delegate_; aura::Window* window_; @@ -164,8 +158,6 @@ class VIEWS_EXPORT NativeWidgetAura : public internal::NativeWidgetPrivate, gfx::NativeCursor cursor_; - ViewProps props_; - DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); }; |