OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/task_manager.h" | 5 #include "chrome/browser/task_manager.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 class TaskManagerViewImpl : public TaskManagerView, | 13 class TaskManagerViewImpl : public TaskManagerView, |
14 public TaskManagerModelObserver { | 14 public TaskManagerModelObserver { |
15 public: | 15 public: |
16 TaskManagerViewImpl(TaskManagerModel* model) { | 16 TaskManagerViewImpl(TaskManagerModel* model) { |
17 model->SetObserver(this); | 17 model->SetObserver(this); |
18 } | 18 } |
19 | 19 |
20 // TaskManagerView | 20 // TaskManagerView |
21 virtual void GetSelection(std::vector<int>* selection); | 21 virtual void GetSelection(std::vector<int>* selection); |
22 virtual void GetFocused(std::vector<int>* focused); | 22 virtual void GetFocused(std::vector<int>* focused); |
23 virtual void OpenWindow(); | 23 virtual void OpenWindow(); |
| 24 virtual void CloseWindow(); |
24 | 25 |
25 // TaskManagerModelObserver | 26 // TaskManagerModelObserver |
26 virtual void OnModelChanged(); | 27 virtual void OnModelChanged(); |
27 virtual void OnItemsChanged(int start, int length); | 28 virtual void OnItemsChanged(int start, int length); |
28 virtual void OnItemsAdded(int start, int length); | 29 virtual void OnItemsAdded(int start, int length); |
29 virtual void OnItemsRemoved(int start, int length); | 30 virtual void OnItemsRemoved(int start, int length); |
30 }; | 31 }; |
31 | 32 |
32 void TaskManagerViewImpl::GetSelection(std::vector<int>* selection) { | 33 void TaskManagerViewImpl::GetSelection(std::vector<int>* selection) { |
33 NOTIMPLEMENTED(); | 34 NOTIMPLEMENTED(); |
34 } | 35 } |
35 | 36 |
36 void TaskManagerViewImpl::GetFocused(std::vector<int>* focused) { | 37 void TaskManagerViewImpl::GetFocused(std::vector<int>* focused) { |
37 NOTIMPLEMENTED(); | 38 NOTIMPLEMENTED(); |
38 } | 39 } |
39 | 40 |
40 void TaskManagerViewImpl::OpenWindow() { | 41 void TaskManagerViewImpl::OpenWindow() { |
41 NOTIMPLEMENTED(); | 42 NOTIMPLEMENTED(); |
42 } | 43 } |
43 | 44 |
| 45 void TaskManagerViewImpl::CloseWindow() { |
| 46 NOTIMPLEMENTED(); |
| 47 } |
| 48 |
44 void TaskManagerViewImpl::OnModelChanged() { | 49 void TaskManagerViewImpl::OnModelChanged() { |
45 NOTIMPLEMENTED(); | 50 NOTIMPLEMENTED(); |
46 } | 51 } |
47 | 52 |
48 void TaskManagerViewImpl::OnItemsChanged(int start, int length) { | 53 void TaskManagerViewImpl::OnItemsChanged(int start, int length) { |
49 NOTIMPLEMENTED(); | 54 NOTIMPLEMENTED(); |
50 } | 55 } |
51 | 56 |
52 void TaskManagerViewImpl::OnItemsAdded(int start, int length) { | 57 void TaskManagerViewImpl::OnItemsAdded(int start, int length) { |
53 NOTIMPLEMENTED(); | 58 NOTIMPLEMENTED(); |
54 } | 59 } |
55 | 60 |
56 void TaskManagerViewImpl::OnItemsRemoved(int start, int length) { | 61 void TaskManagerViewImpl::OnItemsRemoved(int start, int length) { |
57 NOTIMPLEMENTED(); | 62 NOTIMPLEMENTED(); |
58 } | 63 } |
59 | 64 |
60 } // namespace | 65 } // namespace |
61 | 66 |
62 void TaskManager::Init() { | 67 void TaskManager::Init() { |
63 view_.reset(new TaskManagerViewImpl(model_.get())); | 68 view_.reset(new TaskManagerViewImpl(model_.get())); |
64 } | 69 } |
OLD | NEW |