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

Side by Side Diff: ui/views/bubble/bubble_frame_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
« no previous file with comments | « ui/views/bubble/bubble_delegate_unittest.cc ('k') | ui/views/bubble/bubble_frame_view.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_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
6 #define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 6 #define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 27 matching lines...) Expand all
38 const gfx::Rect& client_bounds) const OVERRIDE; 38 const gfx::Rect& client_bounds) const OVERRIDE;
39 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 39 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
40 virtual void GetWindowMask(const gfx::Size& size, 40 virtual void GetWindowMask(const gfx::Size& size,
41 gfx::Path* window_mask) OVERRIDE; 41 gfx::Path* window_mask) OVERRIDE;
42 virtual void ResetWindowControls() OVERRIDE; 42 virtual void ResetWindowControls() OVERRIDE;
43 virtual void UpdateWindowIcon() OVERRIDE; 43 virtual void UpdateWindowIcon() OVERRIDE;
44 virtual void UpdateWindowTitle() OVERRIDE; 44 virtual void UpdateWindowTitle() OVERRIDE;
45 45
46 // View overrides: 46 // View overrides:
47 virtual gfx::Insets GetInsets() const OVERRIDE; 47 virtual gfx::Insets GetInsets() const OVERRIDE;
48 virtual gfx::Size GetPreferredSize() OVERRIDE; 48 virtual gfx::Size GetPreferredSize() const OVERRIDE;
49 virtual gfx::Size GetMinimumSize() OVERRIDE; 49 virtual gfx::Size GetMinimumSize() const OVERRIDE;
50 virtual void Layout() OVERRIDE; 50 virtual void Layout() OVERRIDE;
51 virtual const char* GetClassName() const OVERRIDE; 51 virtual const char* GetClassName() const OVERRIDE;
52 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 52 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
53 virtual void OnThemeChanged() OVERRIDE; 53 virtual void OnThemeChanged() OVERRIDE;
54 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE; 54 virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
55 55
56 // Overridden from ButtonListener: 56 // Overridden from ButtonListener:
57 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE; 57 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
58 58
59 // Use bubble_border() and SetBubbleBorder(), not border() and SetBorder(). 59 // Use bubble_border() and SetBubbleBorder(), not border() and SetBorder().
(...skipping 23 matching lines...) Expand all
83 void MirrorArrowIfOffScreen(bool vertical, 83 void MirrorArrowIfOffScreen(bool vertical,
84 const gfx::Rect& anchor_rect, 84 const gfx::Rect& anchor_rect,
85 const gfx::Size& client_size); 85 const gfx::Size& client_size);
86 86
87 // Adjust the bubble's arrow offsets if the generated window bounds don't fit 87 // Adjust the bubble's arrow offsets if the generated window bounds don't fit
88 // in the monitor bounds. 88 // in the monitor bounds.
89 void OffsetArrowIfOffScreen(const gfx::Rect& anchor_rect, 89 void OffsetArrowIfOffScreen(const gfx::Rect& anchor_rect,
90 const gfx::Size& client_size); 90 const gfx::Size& client_size);
91 91
92 // Calculates the size needed to accommodate the given client area. 92 // Calculates the size needed to accommodate the given client area.
93 gfx::Size GetSizeForClientSize(const gfx::Size& client_size); 93 gfx::Size GetSizeForClientSize(const gfx::Size& client_size) const;
94 94
95 // The bubble border. 95 // The bubble border.
96 BubbleBorder* bubble_border_; 96 BubbleBorder* bubble_border_;
97 97
98 // Margins between the content and the inside of the border, in pixels. 98 // Margins between the content and the inside of the border, in pixels.
99 gfx::Insets content_margins_; 99 gfx::Insets content_margins_;
100 100
101 // The optional title and (x) close button. 101 // The optional title and (x) close button.
102 Label* title_; 102 Label* title_;
103 LabelButton* close_; 103 LabelButton* close_;
104 104
105 // When supplied, this view is placed in the titlebar between the title and 105 // When supplied, this view is placed in the titlebar between the title and
106 // (x) close button. 106 // (x) close button.
107 View* titlebar_extra_view_; 107 View* titlebar_extra_view_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); 109 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
110 }; 110 };
111 111
112 } // namespace views 112 } // namespace views
113 113
114 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 114 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate_unittest.cc ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698