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

Side by Side Diff: ash/frame/caption_buttons/frame_caption_button_container_view.h

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ 5 #ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ 6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/frame/caption_buttons/frame_size_button_delegate.h" 9 #include "ash/frame/caption_buttons/frame_size_button_delegate.h"
10 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // HTNOWHERE if |point| is not over any of the caption buttons. |point| must 84 // HTNOWHERE if |point| is not over any of the caption buttons. |point| must
85 // be in the coordinates of the FrameCaptionButtonContainerView. 85 // be in the coordinates of the FrameCaptionButtonContainerView.
86 int NonClientHitTest(const gfx::Point& point) const; 86 int NonClientHitTest(const gfx::Point& point) const;
87 87
88 // Updates the size button's visibility based on whether |frame_| can be 88 // Updates the size button's visibility based on whether |frame_| can be
89 // maximized and |force_hidden|. A parent view should relayout to reflect the 89 // maximized and |force_hidden|. A parent view should relayout to reflect the
90 // change in visibility. 90 // change in visibility.
91 void UpdateSizeButtonVisibility(bool force_hidden); 91 void UpdateSizeButtonVisibility(bool force_hidden);
92 92
93 // views::View: 93 // views::View:
94 virtual gfx::Size GetPreferredSize() OVERRIDE; 94 virtual gfx::Size GetPreferredSize() const OVERRIDE;
95 virtual void Layout() OVERRIDE; 95 virtual void Layout() OVERRIDE;
96 virtual const char* GetClassName() const OVERRIDE; 96 virtual const char* GetClassName() const OVERRIDE;
97 97
98 private: 98 private:
99 friend class FrameCaptionButtonContainerViewTest; 99 friend class FrameCaptionButtonContainerViewTest;
100 100
101 struct ButtonIconIds { 101 struct ButtonIconIds {
102 ButtonIconIds(); 102 ButtonIconIds();
103 ButtonIconIds(int icon_id, 103 ButtonIconIds(int icon_id,
104 int inactive_icon_id, 104 int inactive_icon_id,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Mapping of the images needed to paint a button for each of the values of 148 // Mapping of the images needed to paint a button for each of the values of
149 // CaptionButtonIcon. 149 // CaptionButtonIcon.
150 std::map<CaptionButtonIcon, ButtonIconIds> button_icon_id_map_; 150 std::map<CaptionButtonIcon, ButtonIconIds> button_icon_id_map_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView); 152 DISALLOW_COPY_AND_ASSIGN(FrameCaptionButtonContainerView);
153 }; 153 };
154 154
155 } // namesapace ash 155 } // namesapace ash
156 156
157 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_ 157 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_CAPTION_BUTTON_CONTAINER_VIEW_H_
OLDNEW
« no previous file with comments | « ash/frame/caption_buttons/frame_caption_button.cc ('k') | ash/frame/caption_buttons/frame_caption_button_container_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698