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

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

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ozone deps Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/test/test_windows.cc ('k') | ui/aura/window.cc » ('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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "ui/aura/aura_export.h" 17 #include "ui/aura/aura_export.h"
18 #include "ui/aura/client/window_types.h"
19 #include "ui/aura/window_layer_type.h" 18 #include "ui/aura/window_layer_type.h"
20 #include "ui/aura/window_observer.h" 19 #include "ui/aura/window_observer.h"
21 #include "ui/compositor/layer_animator.h" 20 #include "ui/compositor/layer_animator.h"
22 #include "ui/compositor/layer_delegate.h" 21 #include "ui/compositor/layer_delegate.h"
23 #include "ui/compositor/layer_owner.h" 22 #include "ui/compositor/layer_owner.h"
24 #include "ui/compositor/layer_type.h" 23 #include "ui/compositor/layer_type.h"
25 #include "ui/events/event_constants.h" 24 #include "ui/events/event_constants.h"
26 #include "ui/events/event_target.h" 25 #include "ui/events/event_target.h"
27 #include "ui/events/event_targeter.h" 26 #include "ui/events/event_targeter.h"
28 #include "ui/events/gestures/gesture_types.h" 27 #include "ui/events/gestures/gesture_types.h"
29 #include "ui/gfx/insets.h" 28 #include "ui/gfx/insets.h"
30 #include "ui/gfx/native_widget_types.h" 29 #include "ui/gfx/native_widget_types.h"
31 #include "ui/gfx/rect.h" 30 #include "ui/gfx/rect.h"
31 #include "ui/wm/public/window_types.h"
32 32
33 namespace gfx { 33 namespace gfx {
34 class Display; 34 class Display;
35 class Transform; 35 class Transform;
36 class Vector2d; 36 class Vector2d;
37 } 37 }
38 38
39 namespace ui { 39 namespace ui {
40 class EventHandler; 40 class EventHandler;
41 class Layer; 41 class Layer;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ui::Layer* RecreateLayer() WARN_UNUSED_RESULT; 93 ui::Layer* RecreateLayer() WARN_UNUSED_RESULT;
94 94
95 void set_owned_by_parent(bool owned_by_parent) { 95 void set_owned_by_parent(bool owned_by_parent) {
96 owned_by_parent_ = owned_by_parent; 96 owned_by_parent_ = owned_by_parent;
97 } 97 }
98 bool owned_by_parent() const { return owned_by_parent_; } 98 bool owned_by_parent() const { return owned_by_parent_; }
99 99
100 // A type is used to identify a class of Windows and customize behavior such 100 // A type is used to identify a class of Windows and customize behavior such
101 // as event handling and parenting. This field should only be consumed by the 101 // as event handling and parenting. This field should only be consumed by the
102 // shell -- Aura itself shouldn't contain type-specific logic. 102 // shell -- Aura itself shouldn't contain type-specific logic.
103 client::WindowType type() const { return type_; } 103 ui::wm::WindowType type() const { return type_; }
104 void SetType(client::WindowType type); 104 void SetType(ui::wm::WindowType type);
105 105
106 int id() const { return id_; } 106 int id() const { return id_; }
107 void set_id(int id) { id_ = id; } 107 void set_id(int id) { id_ = id; }
108 108
109 const std::string& name() const { return name_; } 109 const std::string& name() const { return name_; }
110 void SetName(const std::string& name); 110 void SetName(const std::string& name);
111 111
112 const base::string16 title() const { return title_; } 112 const base::string16 title() const { return title_; }
113 void set_title(const base::string16& title) { title_ = title; } 113 void set_title(const base::string16& title) { title_ = title; }
114 114
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 const Window* GetAncestorWithLayer(gfx::Vector2d* offset) const; 541 const Window* GetAncestorWithLayer(gfx::Vector2d* offset) const;
542 542
543 // Bounds of this window relative to the parent. This is cached as the bounds 543 // Bounds of this window relative to the parent. This is cached as the bounds
544 // of the Layer and Window are not necessarily the same. In particular bounds 544 // of the Layer and Window are not necessarily the same. In particular bounds
545 // of the Layer are relative to the first ancestor with a Layer, where as this 545 // of the Layer are relative to the first ancestor with a Layer, where as this
546 // is relative to the parent Window. 546 // is relative to the parent Window.
547 gfx::Rect bounds_; 547 gfx::Rect bounds_;
548 548
549 WindowEventDispatcher* dispatcher_; 549 WindowEventDispatcher* dispatcher_;
550 550
551 client::WindowType type_; 551 ui::wm::WindowType type_;
552 552
553 // True if the Window is owned by its parent - i.e. it will be deleted by its 553 // True if the Window is owned by its parent - i.e. it will be deleted by its
554 // parent during its parents destruction. True is the default. 554 // parent during its parents destruction. True is the default.
555 bool owned_by_parent_; 555 bool owned_by_parent_;
556 556
557 WindowDelegate* delegate_; 557 WindowDelegate* delegate_;
558 558
559 // The Window's parent. 559 // The Window's parent.
560 Window* parent_; 560 Window* parent_;
561 561
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 }; 606 };
607 607
608 std::map<const void*, Value> prop_map_; 608 std::map<const void*, Value> prop_map_;
609 609
610 DISALLOW_COPY_AND_ASSIGN(Window); 610 DISALLOW_COPY_AND_ASSIGN(Window);
611 }; 611 };
612 612
613 } // namespace aura 613 } // namespace aura
614 614
615 #endif // UI_AURA_WINDOW_H_ 615 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/aura/test/test_windows.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698