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

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

Issue 93863005: ui: Rename ui_export.h to ui_base_export.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: UI_BASE_IMPLEMENTATION Created 6 years, 11 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/webui/jstemplate_builder.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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_base_export.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 #if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_AURA)) 13 #if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(USE_AURA))
14 #error view_prop.h is only for windows and aura builds. 14 #error view_prop.h is only for windows and aura builds.
15 #endif 15 #endif
16 16
17 namespace ui { 17 namespace ui {
18 18
19 // ViewProp maintains a key/value pair for a particular view. ViewProp is 19 // ViewProp maintains a key/value pair for a particular view. ViewProp is
20 // designed as a replacement for the Win32's SetProp, but does not make use of 20 // designed as a replacement for the Win32's SetProp, but does not make use of
21 // window manager memory. ViewProp shares similar semantics as SetProp, the 21 // window manager memory. ViewProp shares similar semantics as SetProp, the
22 // value for a particular view/key pair comes from the last ViewProp created. 22 // value for a particular view/key pair comes from the last ViewProp created.
23 class UI_EXPORT ViewProp { 23 class UI_BASE_EXPORT ViewProp {
24 public: 24 public:
25 // Associates data with a view/key pair. If a ViewProp has already been 25 // Associates data with a view/key pair. If a ViewProp has already been
26 // created for the specified pair |data| replaces the current value. 26 // created for the specified pair |data| replaces the current value.
27 // 27 //
28 // ViewProp does *not* make a copy of the char*, the pointer is used for 28 // ViewProp does *not* make a copy of the char*, the pointer is used for
29 // sorting. 29 // sorting.
30 ViewProp(gfx::AcceleratedWidget view, const char* key, void* data); 30 ViewProp(gfx::AcceleratedWidget view, const char* key, void* data);
31 ~ViewProp(); 31 ~ViewProp();
32 32
33 // Returns the value associated with the view/key pair, or NULL if there is 33 // Returns the value associated with the view/key pair, or NULL if there is
34 // none. 34 // none.
35 static void* GetValue(gfx::AcceleratedWidget view, const char* key); 35 static void* GetValue(gfx::AcceleratedWidget view, const char* key);
36 36
37 // Returns the key. 37 // Returns the key.
38 const char* Key() const; 38 const char* Key() const;
39 39
40 private: 40 private:
41 class Data; 41 class Data;
42 42
43 // Stores the actual data. 43 // Stores the actual data.
44 scoped_refptr<Data> data_; 44 scoped_refptr<Data> data_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(ViewProp); 46 DISALLOW_COPY_AND_ASSIGN(ViewProp);
47 }; 47 };
48 48
49 } // namespace ui 49 } // namespace ui
50 50
51 #endif // UI_BASE_VIEW_PROP_H_ 51 #endif // UI_BASE_VIEW_PROP_H_
OLDNEW
« no previous file with comments | « ui/base/ui_export.h ('k') | ui/base/webui/jstemplate_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698