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

Side by Side Diff: ui/views/bubble/bubble_frame_view.h

Issue 15667004: Add resize support for Views new style dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove incorrect DialogDelegate::CanResize overrride. Created 7 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 | « no previous file | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Use bubble_border() and SetBubbleBorder(), not border() and set_border(). 49 // Use bubble_border() and SetBubbleBorder(), not border() and set_border().
50 BubbleBorder* bubble_border() const { return bubble_border_; } 50 BubbleBorder* bubble_border() const { return bubble_border_; }
51 void SetBubbleBorder(BubbleBorder* border); 51 void SetBubbleBorder(BubbleBorder* border);
52 52
53 gfx::Insets content_margins() const { return content_margins_; } 53 gfx::Insets content_margins() const { return content_margins_; }
54 54
55 void SetTitle(const string16& title); 55 void SetTitle(const string16& title);
56 void SetShowCloseButton(bool show); 56 void SetShowCloseButton(bool show);
57 void SetTitlebarExtraView(View* view); 57 void SetTitlebarExtraView(View* view);
58 58
59 void set_can_drag(bool can_drag) { can_drag_ = can_drag; }
60
61 // Given the size of the contents and the rect to point at, returns the bounds 59 // Given the size of the contents and the rect to point at, returns the bounds
62 // of the bubble window. The bubble's arrow location may change if the bubble 60 // of the bubble window. The bubble's arrow location may change if the bubble
63 // does not fit on the monitor and |adjust_if_offscreen| is true. 61 // does not fit on the monitor and |adjust_if_offscreen| is true.
64 gfx::Rect GetUpdatedWindowBounds(const gfx::Rect& anchor_rect, 62 gfx::Rect GetUpdatedWindowBounds(const gfx::Rect& anchor_rect,
65 gfx::Size client_size, 63 gfx::Size client_size,
66 bool adjust_if_offscreen); 64 bool adjust_if_offscreen);
67 65
68 protected: 66 protected:
69 // Returns the bounds for the monitor showing the specified |rect|. 67 // Returns the bounds for the monitor showing the specified |rect|.
70 // This function is virtual to support testing environments. 68 // This function is virtual to support testing environments.
(...skipping 20 matching lines...) Expand all
91 gfx::Insets content_margins_; 89 gfx::Insets content_margins_;
92 90
93 // The optional title and (x) close button. 91 // The optional title and (x) close button.
94 Label* title_; 92 Label* title_;
95 LabelButton* close_; 93 LabelButton* close_;
96 94
97 // When supplied, this view is placed in the titlebar between the title and 95 // When supplied, this view is placed in the titlebar between the title and
98 // (x) close button. 96 // (x) close button.
99 View* titlebar_extra_view_; 97 View* titlebar_extra_view_;
100 98
101 // A flag controlling the ability to drag this frame.
102 bool can_drag_;
103
104 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); 99 DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
105 }; 100 };
106 101
107 } // namespace views 102 } // namespace views
108 103
109 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ 104 #endif // UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698