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

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

Issue 2222703002: Aura Icon Capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Icons To Aura::Window Created 4 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 int id() const { return id_; } 104 int id() const { return id_; }
105 void set_id(int id) { id_ = id; } 105 void set_id(int id) { id_ = id; }
106 106
107 const std::string& name() const { return name_; } 107 const std::string& name() const { return name_; }
108 void SetName(const std::string& name); 108 void SetName(const std::string& name);
109 109
110 const base::string16 title() const { return title_; } 110 const base::string16 title() const { return title_; }
111 void SetTitle(const base::string16& title); 111 void SetTitle(const base::string16& title);
112 112
113 const gfx::ImageSkia icon() const { return icon_; }
sky 2016/08/08 19:19:47 We generally do not add state like this to Window
qiangchen 2016/08/09 16:48:40 I encounted some difficulty doing that way. Simply
sky 2016/08/09 19:12:11 You probably want DEFINE_OWNED_WINDOW_PROPERTY_KEY
qiangchen 2016/08/09 21:10:28 Done.
114 void SetIcon(const gfx::ImageSkia& icon);
115
113 bool transparent() const { return transparent_; } 116 bool transparent() const { return transparent_; }
114 void SetTransparent(bool transparent); 117 void SetTransparent(bool transparent);
115 118
116 // See description in Layer::SetFillsBoundsCompletely. 119 // See description in Layer::SetFillsBoundsCompletely.
117 void SetFillsBoundsCompletely(bool fills_bounds); 120 void SetFillsBoundsCompletely(bool fills_bounds);
118 121
119 WindowDelegate* delegate() { return delegate_; } 122 WindowDelegate* delegate() { return delegate_; }
120 const WindowDelegate* delegate() const { return delegate_; } 123 const WindowDelegate* delegate() const { return delegate_; }
121 124
122 const gfx::Rect& bounds() const { return bounds_; } 125 const gfx::Rect& bounds() const { return bounds_; }
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // The visibility state of the window as set by Show()/Hide(). This may differ 493 // The visibility state of the window as set by Show()/Hide(). This may differ
491 // from the visibility of the underlying layer, which may remain visible after 494 // from the visibility of the underlying layer, which may remain visible after
492 // the window is hidden (e.g. to animate its disappearance). 495 // the window is hidden (e.g. to animate its disappearance).
493 bool visible_; 496 bool visible_;
494 497
495 int id_; 498 int id_;
496 std::string name_; 499 std::string name_;
497 500
498 base::string16 title_; 501 base::string16 title_;
499 502
503 gfx::ImageSkia icon_;
504
500 // Whether layer is initialized as non-opaque. 505 // Whether layer is initialized as non-opaque.
501 bool transparent_; 506 bool transparent_;
502 507
503 std::unique_ptr<LayoutManager> layout_manager_; 508 std::unique_ptr<LayoutManager> layout_manager_;
504 std::unique_ptr<ui::EventTargeter> targeter_; 509 std::unique_ptr<ui::EventTargeter> targeter_;
505 510
506 void* user_data_; 511 void* user_data_;
507 512
508 // Makes the window pass all events through to any windows behind it. 513 // Makes the window pass all events through to any windows behind it.
509 bool ignore_events_; 514 bool ignore_events_;
(...skipping 13 matching lines...) Expand all
523 }; 528 };
524 529
525 std::map<const void*, Value> prop_map_; 530 std::map<const void*, Value> prop_map_;
526 531
527 DISALLOW_COPY_AND_ASSIGN(Window); 532 DISALLOW_COPY_AND_ASSIGN(Window);
528 }; 533 };
529 534
530 } // namespace aura 535 } // namespace aura
531 536
532 #endif // UI_AURA_WINDOW_H_ 537 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window.cc » ('j') | ui/views/widget/desktop_aura/desktop_native_widget_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698