OLD | NEW |
(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 ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ |
| 6 #define ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/views/window/non_client_view.h" |
| 10 |
| 11 namespace views { |
| 12 class Label; |
| 13 class Widget; |
| 14 } |
| 15 |
| 16 namespace athena { |
| 17 |
| 18 class ActivityViewModel; |
| 19 |
| 20 // A NonClientFrameView used for activity. |
| 21 class ActivityFrameView : public views::NonClientFrameView { |
| 22 public: |
| 23 // Internal class name. |
| 24 static const char kViewClassName[]; |
| 25 |
| 26 ActivityFrameView(views::Widget* frame, ActivityViewModel* view_model); |
| 27 virtual ~ActivityFrameView(); |
| 28 |
| 29 // views::NonClientFrameView overrides: |
| 30 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
| 31 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 32 const gfx::Rect& client_bounds) const OVERRIDE; |
| 33 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| 34 virtual void GetWindowMask(const gfx::Size& size, |
| 35 gfx::Path* window_mask) OVERRIDE; |
| 36 virtual void ResetWindowControls() OVERRIDE; |
| 37 virtual void UpdateWindowIcon() OVERRIDE; |
| 38 virtual void UpdateWindowTitle() OVERRIDE; |
| 39 |
| 40 // views::View overrides: |
| 41 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
| 42 virtual const char* GetClassName() const OVERRIDE; |
| 43 virtual void Layout() OVERRIDE; |
| 44 |
| 45 private: |
| 46 int NonClientTopBorderHeight() const; |
| 47 |
| 48 // Not owned. |
| 49 views::Widget* frame_; |
| 50 ActivityViewModel* view_model_; |
| 51 views::Label* title_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(ActivityFrameView); |
| 54 }; |
| 55 |
| 56 } // namespace athena |
| 57 |
| 58 #endif // ATHENA_ACTIVITY_ACTIVITY_FRAME_VIEW_H_ |
OLD | NEW |