OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "athena/activity/activity_widget_delegate.h" | 5 #include "athena/activity/activity_widget_delegate.h" |
6 | 6 |
7 #include "athena/activity/activity_frame_view.h" | 7 #include "athena/activity/activity_frame_view.h" |
8 #include "athena/activity/public/activity_view_model.h" | 8 #include "athena/activity/public/activity_view_model.h" |
9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
10 #include "ui/views/window/client_view.h" | 10 #include "ui/views/window/client_view.h" |
11 | 11 |
12 namespace athena { | 12 namespace athena { |
13 | 13 |
14 ActivityWidgetDelegate::ActivityWidgetDelegate(ActivityViewModel* view_model) | 14 ActivityWidgetDelegate::ActivityWidgetDelegate(ActivityViewModel* view_model) |
15 : view_model_(view_model) { | 15 : view_model_(view_model) { |
16 } | 16 } |
17 | 17 |
18 ActivityWidgetDelegate::~ActivityWidgetDelegate() { | 18 ActivityWidgetDelegate::~ActivityWidgetDelegate() { |
19 } | 19 } |
20 | 20 |
| 21 bool ActivityWidgetDelegate::CanResize() const { |
| 22 return true; |
| 23 } |
| 24 |
| 25 bool ActivityWidgetDelegate::CanMaximize() const { |
| 26 return true; |
| 27 } |
| 28 |
| 29 bool ActivityWidgetDelegate::CanMinimize() const { |
| 30 return true; |
| 31 } |
| 32 |
21 base::string16 ActivityWidgetDelegate::GetWindowTitle() const { | 33 base::string16 ActivityWidgetDelegate::GetWindowTitle() const { |
22 return view_model_->GetTitle(); | 34 return view_model_->GetTitle(); |
23 } | 35 } |
24 | 36 |
25 void ActivityWidgetDelegate::DeleteDelegate() { | 37 void ActivityWidgetDelegate::DeleteDelegate() { |
26 delete this; | 38 delete this; |
27 } | 39 } |
28 | 40 |
29 views::Widget* ActivityWidgetDelegate::GetWidget() { | 41 views::Widget* ActivityWidgetDelegate::GetWidget() { |
30 return GetContentsView()->GetWidget(); | 42 return GetContentsView()->GetWidget(); |
(...skipping 11 matching lines...) Expand all Loading... |
42 views::Widget* widget) { | 54 views::Widget* widget) { |
43 return new views::ClientView(widget, view_model_->GetContentsView()); | 55 return new views::ClientView(widget, view_model_->GetContentsView()); |
44 } | 56 } |
45 | 57 |
46 views::NonClientFrameView* ActivityWidgetDelegate::CreateNonClientFrameView( | 58 views::NonClientFrameView* ActivityWidgetDelegate::CreateNonClientFrameView( |
47 views::Widget* widget) { | 59 views::Widget* widget) { |
48 return new ActivityFrameView(widget, view_model_); | 60 return new ActivityFrameView(widget, view_model_); |
49 } | 61 } |
50 | 62 |
51 } // namespace athena | 63 } // namespace athena |
OLD | NEW |