| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef APP_VIEW_PROP_H_ | 5 #ifndef UI_BASE_VIEW_PROP_H_ |
| 6 #define APP_VIEW_PROP_H_ | 6 #define UI_BASE_VIEW_PROP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| 11 #include "gfx/native_widget_types.h" | 11 #include "gfx/native_widget_types.h" |
| 12 | 12 |
| 13 namespace app { | 13 namespace ui { |
| 14 | 14 |
| 15 // ViewProp maintains a key/value pair for a particular view. ViewProp is | 15 // ViewProp maintains a key/value pair for a particular view. ViewProp is |
| 16 // designed as a replacement for the Win32's SetProp, but does not make use of | 16 // designed as a replacement for the Win32's SetProp, but does not make use of |
| 17 // window manager memory. ViewProp shares similar semantics as SetProp, the | 17 // window manager memory. ViewProp shares similar semantics as SetProp, the |
| 18 // value for a particular view/key pair comes from the last ViewProp created. | 18 // value for a particular view/key pair comes from the last ViewProp created. |
| 19 class ViewProp { | 19 class ViewProp { |
| 20 public: | 20 public: |
| 21 // Associates data with a view/key pair. If a ViewProp has already been | 21 // Associates data with a view/key pair. If a ViewProp has already been |
| 22 // created for the specified pair |data| replaces the current value. | 22 // created for the specified pair |data| replaces the current value. |
| 23 // | 23 // |
| (...skipping 11 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 class Data; | 37 class Data; |
| 38 | 38 |
| 39 // Stores the actual data. | 39 // Stores the actual data. |
| 40 scoped_refptr<Data> data_; | 40 scoped_refptr<Data> data_; |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(ViewProp); | 42 DISALLOW_COPY_AND_ASSIGN(ViewProp); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace app | 45 } // namespace ui |
| 46 | 46 |
| 47 #endif // APP_VIEW_PROP_H_ | 47 #endif // UI_BASE_VIEW_PROP_H_ |
| OLD | NEW |