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/public/activity_view_manager.h" | 5 #include "athena/activity/public/activity_view_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "athena/activity/public/activity.h" | 10 #include "athena/activity/public/activity.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 container_->AddChildView(content_); | 41 container_->AddChildView(content_); |
42 | 42 |
43 widget_ = new views::Widget; | 43 widget_ = new views::Widget; |
44 views::Widget::InitParams params( | 44 views::Widget::InitParams params( |
45 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 45 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
46 params.context = ScreenManager::Get()->GetContext(); | 46 params.context = ScreenManager::Get()->GetContext(); |
47 params.delegate = NULL; | 47 params.delegate = NULL; |
48 params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; | 48 params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; |
49 widget_->Init(params); | 49 widget_->Init(params); |
50 widget_->SetContentsView(container_); | 50 widget_->SetContentsView(container_); |
| 51 |
| 52 activity_->GetActivityViewModel()->Init(); |
51 } | 53 } |
52 | 54 |
53 virtual ~ActivityWidget() {} | 55 virtual ~ActivityWidget() {} |
54 | 56 |
55 void Show() { | 57 void Show() { |
56 Update(); | 58 Update(); |
57 widget_->Show(); | 59 widget_->Show(); |
58 } | 60 } |
59 | 61 |
60 void Update() { | 62 void Update() { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 ActivityViewManager* ActivityViewManager::Get() { | 153 ActivityViewManager* ActivityViewManager::Get() { |
152 return instance; | 154 return instance; |
153 } | 155 } |
154 | 156 |
155 void ActivityViewManager::Shutdown() { | 157 void ActivityViewManager::Shutdown() { |
156 CHECK(instance); | 158 CHECK(instance); |
157 delete instance; | 159 delete instance; |
158 } | 160 } |
159 | 161 |
160 } // namespace athena | 162 } // namespace athena |
OLD | NEW |