| 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/activity_widget_delegate.h" | 10 #include "athena/activity/activity_widget_delegate.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; | 33 params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; |
| 34 widget_->Init(params); | 34 widget_->Init(params); |
| 35 activity_->GetActivityViewModel()->Init(); | 35 activity_->GetActivityViewModel()->Init(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 virtual ~ActivityWidget() {} | 38 virtual ~ActivityWidget() {} |
| 39 | 39 |
| 40 void Show() { | 40 void Show() { |
| 41 Update(); | 41 Update(); |
| 42 widget_->Show(); | 42 widget_->Show(); |
| 43 widget_->Activate(); |
| 43 } | 44 } |
| 44 | 45 |
| 45 void Update() { | 46 void Update() { |
| 46 widget_->UpdateWindowTitle(); | 47 widget_->UpdateWindowTitle(); |
| 47 } | 48 } |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 | 51 |
| 51 Activity* activity_; | 52 Activity* activity_; |
| 52 views::Widget* widget_; | 53 views::Widget* widget_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 ActivityViewManager* ActivityViewManager::Get() { | 108 ActivityViewManager* ActivityViewManager::Get() { |
| 108 return instance; | 109 return instance; |
| 109 } | 110 } |
| 110 | 111 |
| 111 void ActivityViewManager::Shutdown() { | 112 void ActivityViewManager::Shutdown() { |
| 112 CHECK(instance); | 113 CHECK(instance); |
| 113 delete instance; | 114 delete instance; |
| 114 } | 115 } |
| 115 | 116 |
| 116 } // namespace athena | 117 } // namespace athena |
| OLD | NEW |