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

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

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « athena/activity/activity_widget_delegate.h ('k') | athena/activity/public/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "athena/activity/activity_widget_delegate.h"
6
7 #include "athena/activity/activity_frame_view.h"
8 #include "athena/activity/public/activity_view_model.h"
9 #include "ui/views/view.h"
10 #include "ui/views/window/client_view.h"
11
12 namespace athena {
13
14 ActivityWidgetDelegate::ActivityWidgetDelegate(ActivityViewModel* view_model)
15 : view_model_(view_model) {
16 }
17
18 ActivityWidgetDelegate::~ActivityWidgetDelegate() {
19 }
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
33 base::string16 ActivityWidgetDelegate::GetWindowTitle() const {
34 return view_model_->GetTitle();
35 }
36
37 void ActivityWidgetDelegate::DeleteDelegate() {
38 delete this;
39 }
40
41 views::Widget* ActivityWidgetDelegate::GetWidget() {
42 return GetContentsView()->GetWidget();
43 }
44
45 const views::Widget* ActivityWidgetDelegate::GetWidget() const {
46 return const_cast<ActivityWidgetDelegate*>(this)->GetWidget();
47 }
48
49 views::View* ActivityWidgetDelegate::GetContentsView() {
50 return view_model_->GetContentsView();
51 }
52
53 views::NonClientFrameView* ActivityWidgetDelegate::CreateNonClientFrameView(
54 views::Widget* widget) {
55 return new ActivityFrameView(widget, view_model_);
56 }
57
58 } // namespace athena
OLDNEW
« no previous file with comments | « athena/activity/activity_widget_delegate.h ('k') | athena/activity/public/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698