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

Side by Side Diff: ash/wm/dialog_frame_view.h

Issue 9166014: Allow a Views client to provide a default frameview for window widgets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
Property Changes:
Added: svn:eol-style
+ LF
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 ASH_WM_DIALOG_FRAME_VIEW_H_
6 #define ASH_WM_DIALOG_FRAME_VIEW_H_
7 #pragma once
8
9 #include "ui/views/window/non_client_view.h"
10
11 namespace gfx {
12 class Font;
13 }
14
15 namespace ash {
16 namespace internal {
17
18 // A NonClientFrameView that implements a Kennedy-look for dialogs.
19 class DialogFrameView : public views::NonClientFrameView {
20 public:
21 // Internal class name.
22 static const char kViewClassName[];
23
24 DialogFrameView();
25 virtual ~DialogFrameView();
26
27 // Overridden from views::NonClientFrameView:
28 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
29 virtual gfx::Rect GetWindowBoundsForClientBounds(
30 const gfx::Rect& client_bounds) const OVERRIDE;
31 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
32 virtual void GetWindowMask(const gfx::Size& size,
33 gfx::Path* window_mask) OVERRIDE;
34 virtual void ResetWindowControls() OVERRIDE;
35 virtual void UpdateWindowIcon() OVERRIDE;
36
37 // Overridden from View:
38 virtual std::string GetClassName() const OVERRIDE;
39 virtual void Layout() OVERRIDE;
40 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
41 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
42 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
43
44 private:
45 int GetNonClientTopHeight() const;
46
47 gfx::Rect title_display_rect_;
48 gfx::Rect close_button_rect_;
49
50 static gfx::Font* title_font_;
51
52 DISALLOW_COPY_AND_ASSIGN(DialogFrameView);
53 };
54
55 } // namespace internal
56 } // namespace views
57
58 #endif // ASH_WM_DIALOG_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698