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

Side by Side Diff: ui/aura/window.h

Issue 801953002: Use template specialization to generate WindowProperty code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use namespace Created 6 years 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
« no previous file with comments | « ui/aura/client/focus_client.cc ('k') | ui/aura/window_property.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AURA_WINDOW_H_ 5 #ifndef UI_AURA_WINDOW_H_
6 #define UI_AURA_WINDOW_H_ 6 #define UI_AURA_WINDOW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 class LayoutManager; 46 class LayoutManager;
47 class WindowDelegate; 47 class WindowDelegate;
48 class WindowObserver; 48 class WindowObserver;
49 class WindowTreeHost; 49 class WindowTreeHost;
50 50
51 // Defined in window_property.h (which we do not include) 51 // Defined in window_property.h (which we do not include)
52 template<typename T> 52 template<typename T>
53 struct WindowProperty; 53 struct WindowProperty;
54 54
55 namespace subtle {
56 class PropertyHelper;
57 }
58
55 namespace test { 59 namespace test {
56 class WindowTestApi; 60 class WindowTestApi;
57 } 61 }
58 62
59 // Aura window implementation. Interesting events are sent to the 63 // Aura window implementation. Interesting events are sent to the
60 // WindowDelegate. 64 // WindowDelegate.
61 // TODO(beng): resolve ownership. 65 // TODO(beng): resolve ownership.
62 class AURA_EXPORT Window : public ui::LayerDelegate, 66 class AURA_EXPORT Window : public ui::LayerDelegate,
63 public ui::LayerOwner, 67 public ui::LayerOwner,
64 public ui::EventTarget, 68 public ui::EventTarget,
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 329
326 protected: 330 protected:
327 // Deletes (or removes if not owned by parent) all child windows. Intended for 331 // Deletes (or removes if not owned by parent) all child windows. Intended for
328 // use from the destructor. 332 // use from the destructor.
329 void RemoveOrDestroyChildren(); 333 void RemoveOrDestroyChildren();
330 334
331 private: 335 private:
332 friend class test::WindowTestApi; 336 friend class test::WindowTestApi;
333 friend class LayoutManager; 337 friend class LayoutManager;
334 friend class WindowTargeter; 338 friend class WindowTargeter;
335 339 friend class subtle::PropertyHelper;
336 // Called by the public {Set,Get,Clear}Property functions. 340 // Called by the public {Set,Get,Clear}Property functions.
337 int64 SetPropertyInternal(const void* key, 341 int64 SetPropertyInternal(const void* key,
338 const char* name, 342 const char* name,
339 PropertyDeallocator deallocator, 343 PropertyDeallocator deallocator,
340 int64 value, 344 int64 value,
341 int64 default_value); 345 int64 default_value);
342 int64 GetPropertyInternal(const void* key, int64 default_value) const; 346 int64 GetPropertyInternal(const void* key, int64 default_value) const;
343 347
344 // Returns true if the mouse pointer at relative-to-this-Window's-origin 348 // Returns true if the mouse pointer at relative-to-this-Window's-origin
345 // |local_point| can trigger an event for this Window. 349 // |local_point| can trigger an event for this Window.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 }; 541 };
538 542
539 std::map<const void*, Value> prop_map_; 543 std::map<const void*, Value> prop_map_;
540 544
541 DISALLOW_COPY_AND_ASSIGN(Window); 545 DISALLOW_COPY_AND_ASSIGN(Window);
542 }; 546 };
543 547
544 } // namespace aura 548 } // namespace aura
545 549
546 #endif // UI_AURA_WINDOW_H_ 550 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/aura/client/focus_client.cc ('k') | ui/aura/window_property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698