Support MPEG1 audio in the MPEG2-TS stream parser.
[chromium-blink-merge.git] / athena / activity / activity_widget_delegate.cc
blob3c638e8564afc8ad95d00c6c7998af660fc2da3d
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.
5 #include "athena/activity/activity_widget_delegate.h"
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"
12 namespace athena {
14 ActivityWidgetDelegate::ActivityWidgetDelegate(ActivityViewModel* view_model)
15 : view_model_(view_model) {
18 ActivityWidgetDelegate::~ActivityWidgetDelegate() {
21 base::string16 ActivityWidgetDelegate::GetWindowTitle() const {
22 return view_model_->GetTitle();
25 void ActivityWidgetDelegate::DeleteDelegate() {
26 delete this;
29 views::Widget* ActivityWidgetDelegate::GetWidget() {
30 return GetContentsView()->GetWidget();
33 const views::Widget* ActivityWidgetDelegate::GetWidget() const {
34 return const_cast<ActivityWidgetDelegate*>(this)->GetWidget();
37 views::View* ActivityWidgetDelegate::GetContentsView() {
38 return view_model_->GetContentsView();
41 views::ClientView* ActivityWidgetDelegate::CreateClientView(
42 views::Widget* widget) {
43 return new views::ClientView(widget, view_model_->GetContentsView());
46 views::NonClientFrameView* ActivityWidgetDelegate::CreateNonClientFrameView(
47 views::Widget* widget) {
48 return new ActivityFrameView(widget, view_model_);
51 } // namespace athena