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

Side by Side Diff: ui/views/window/dialog_frame_view.h

Issue 12184004: Replace DialogFrameView with an enhanced BubbleFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment. Created 7 years, 10 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/window/dialog_delegate.cc ('k') | ui/views/window/dialog_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_WINDOW_DIALOG_FRAME_VIEW_H_
6 #define UI_VIEWS_WINDOW_DIALOG_FRAME_VIEW_H_
7
8 #include "ui/views/controls/button/button.h"
9 #include "ui/views/window/non_client_view.h"
10
11 namespace views {
12
13 class Label;
14 class LabelButton;
15
16 // A NonClientFrameView that implements a new-style for dialogs.
17 class VIEWS_EXPORT DialogFrameView : public NonClientFrameView,
18 public ButtonListener {
19 public:
20 explicit DialogFrameView(const string16& title);
21 virtual ~DialogFrameView();
22
23 // Overridden from NonClientFrameView:
24 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
25 virtual gfx::Rect GetWindowBoundsForClientBounds(
26 const gfx::Rect& client_bounds) const OVERRIDE;
27 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
28 virtual void GetWindowMask(const gfx::Size& size,
29 gfx::Path* window_mask) OVERRIDE;
30 virtual void ResetWindowControls() OVERRIDE;
31 virtual void UpdateWindowIcon() OVERRIDE;
32 virtual void UpdateWindowTitle() OVERRIDE;
33
34 // Overridden from View:
35 virtual std::string GetClassName() const OVERRIDE;
36 virtual void Layout() OVERRIDE;
37
38 // Overridden from ButtonListener:
39 virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
40
41 private:
42 gfx::Insets GetClientInsets() const;
43
44 Label* title_;
45 LabelButton* close_;
46
47 // The margins between the content and the inside of the border.
48 gfx::Insets content_margins_;
49
50 DISALLOW_COPY_AND_ASSIGN(DialogFrameView);
51 };
52
53 } // namespace views
54
55 #endif // UI_VIEWS_WINDOW_DIALOG_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/window/dialog_delegate.cc ('k') | ui/views/window/dialog_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698