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

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

Issue 11363250: Allow Chrome apps to create Ash Panels (apps v2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback and add unit test for PanelLayoutManager minimize/restore Created 8 years, 1 month 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 (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 ASH_WM_PANEL_FRAME_VIEW_H_ 5 #ifndef ASH_WM_PANEL_FRAME_VIEW_H_
6 #define ASH_WM_PANEL_FRAME_VIEW_H_ 6 #define ASH_WM_PANEL_FRAME_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/aura/aura_export.h" 10 #include "ui/aura/aura_export.h"
11 #include "ui/gfx/insets.h"
11 #include "ui/views/window/non_client_view.h" 12 #include "ui/views/window/non_client_view.h"
12 #include "ui/views/controls/button/button.h" // ButtonListener 13 #include "ui/views/controls/button/button.h" // ButtonListener
13 14
14 namespace views { 15 namespace views {
15 class ImageButton; 16 class ImageButton;
16 } 17 }
17 18
18 namespace ash { 19 namespace ash {
19 20
20 class FramePainter; 21 class FramePainter;
21 22
22 class ASH_EXPORT PanelFrameView : public views::NonClientFrameView, 23 class ASH_EXPORT PanelFrameView : public views::NonClientFrameView,
23 public views::ButtonListener { 24 public views::ButtonListener {
24 public: 25 public:
25 explicit PanelFrameView(views::Widget* frame); 26 enum FrameType {
27 FRAME_NONE,
28 FRAME_ASH
29 };
30
31 PanelFrameView(views::Widget* frame, FrameType frame_type);
26 virtual ~PanelFrameView(); 32 virtual ~PanelFrameView();
27 33
34 gfx::Insets GetFrameInsets() const;
35
28 private: 36 private:
37 void InitFramePainter(views::Widget* frame);
38
29 // Overridden from views::NonClientFrameView: 39 // Overridden from views::NonClientFrameView:
30 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; 40 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
31 virtual gfx::Rect GetWindowBoundsForClientBounds( 41 virtual gfx::Rect GetWindowBoundsForClientBounds(
32 const gfx::Rect& client_bounds) const OVERRIDE; 42 const gfx::Rect& client_bounds) const OVERRIDE;
33 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; 43 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
34 virtual void GetWindowMask(const gfx::Size& size, 44 virtual void GetWindowMask(const gfx::Size& size,
35 gfx::Path* window_mask) OVERRIDE; 45 gfx::Path* window_mask) OVERRIDE;
36 virtual void ResetWindowControls() OVERRIDE; 46 virtual void ResetWindowControls() OVERRIDE;
37 virtual void UpdateWindowIcon() OVERRIDE; 47 virtual void UpdateWindowIcon() OVERRIDE;
38 virtual void UpdateWindowTitle() OVERRIDE; 48 virtual void UpdateWindowTitle() OVERRIDE;
(...skipping 12 matching lines...) Expand all
51 views::ImageButton* close_button_; 61 views::ImageButton* close_button_;
52 views::ImageButton* minimize_button_; 62 views::ImageButton* minimize_button_;
53 gfx::Rect client_view_bounds_; 63 gfx::Rect client_view_bounds_;
54 64
55 DISALLOW_COPY_AND_ASSIGN(PanelFrameView); 65 DISALLOW_COPY_AND_ASSIGN(PanelFrameView);
56 }; 66 };
57 67
58 } 68 }
59 69
60 #endif // ASH_WM_PANEL_FRAME_VIEW_H_ 70 #endif // ASH_WM_PANEL_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698