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

Side by Side Diff: ui/base/view_prop.h

Issue 7569005: Rename UI_API to UI_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/ui_export.h ('k') | ui/base/win/hwnd_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 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 UI_BASE_VIEW_PROP_H_ 5 #ifndef UI_BASE_VIEW_PROP_H_
6 #define UI_BASE_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/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "ui/base/ui_export.h"
11 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
12 #include "ui/ui_api.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 // ViewProp maintains a key/value pair for a particular view. ViewProp is 16 // ViewProp maintains a key/value pair for a particular view. ViewProp is
17 // designed as a replacement for the Win32's SetProp, but does not make use of 17 // designed as a replacement for the Win32's SetProp, but does not make use of
18 // window manager memory. ViewProp shares similar semantics as SetProp, the 18 // window manager memory. ViewProp shares similar semantics as SetProp, the
19 // value for a particular view/key pair comes from the last ViewProp created. 19 // value for a particular view/key pair comes from the last ViewProp created.
20 class UI_API ViewProp { 20 class UI_EXPORT ViewProp {
21 public: 21 public:
22 // Associates data with a view/key pair. If a ViewProp has already been 22 // Associates data with a view/key pair. If a ViewProp has already been
23 // created for the specified pair |data| replaces the current value. 23 // created for the specified pair |data| replaces the current value.
24 // 24 //
25 // ViewProp does *not* make a copy of the char*, the pointer is used for 25 // ViewProp does *not* make a copy of the char*, the pointer is used for
26 // sorting. 26 // sorting.
27 ViewProp(gfx::NativeView view, const char* key, void* data); 27 ViewProp(gfx::NativeView view, const char* key, void* data);
28 ~ViewProp(); 28 ~ViewProp();
29 29
30 // Returns the value associated with the view/key pair, or NULL if there is 30 // Returns the value associated with the view/key pair, or NULL if there is
31 // none. 31 // none.
32 static void* GetValue(gfx::NativeView view, const char* key); 32 static void* GetValue(gfx::NativeView view, const char* key);
33 33
34 // Returns the key. 34 // Returns the key.
35 const char* Key() const; 35 const char* Key() const;
36 36
37 private: 37 private:
38 class Data; 38 class Data;
39 39
40 // Stores the actual data. 40 // Stores the actual data.
41 scoped_refptr<Data> data_; 41 scoped_refptr<Data> data_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(ViewProp); 43 DISALLOW_COPY_AND_ASSIGN(ViewProp);
44 }; 44 };
45 45
46 } // namespace ui 46 } // namespace ui
47 47
48 #endif // UI_BASE_VIEW_PROP_H_ 48 #endif // UI_BASE_VIEW_PROP_H_
OLDNEW
« no previous file with comments | « ui/base/ui_export.h ('k') | ui/base/win/hwnd_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698