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

Side by Side Diff: athena/activity/activity_widget_delegate.cc

Issue 668513003: Selecting an app window from the overview mode maximizes the window only if it's maximizable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « athena/activity/activity_widget_delegate.h ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « athena/activity/activity_widget_delegate.h ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698