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

Unified Diff: ui/aura/window.cc

Issue 8428010: Cleanup: Remove ViewProp from aura build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 9 years, 2 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
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index ec76fc73e7dec3d2de51b43dc87869fb3d06367c..a244ac44b90e1b4ceda46806724e44c791081f25 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -17,7 +17,6 @@
#include "ui/aura/window_observer.h"
#include "ui/aura/window_types.h"
#include "ui/base/animation/multi_animation.h"
-#include "ui/base/view_prop.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/screen.h"
@@ -70,8 +69,6 @@ Window::~Window() {
parent_->RemoveChild(this);
FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroyed(this));
-
- STLDeleteValues(&prop_map_);
}
void Window::Init(ui::Layer::LayerType layer_type) {
@@ -422,16 +419,17 @@ bool Window::IsOrContainsFullscreenWindow() const {
}
void Window::SetProperty(const char* name, void* value) {
- ui::ViewProp* prop = prop_map_[name];
- delete prop;
if (value)
- prop_map_[name] = new ui::ViewProp(this, name, value);
+ prop_map_[name] = value;
else
prop_map_.erase(name);
}
void* Window::GetProperty(const char* name) const {
- return ui::ViewProp::GetValue(const_cast<gfx::NativeView>(this), name);
+ std::map<const char*, void*>::const_iterator iter = prop_map_.find(name);
+ if (iter == prop_map_.end())
+ return NULL;
+ return iter->second;
}
Desktop* Window::GetDesktop() {
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698