OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/example_factory.h" | 10 #include "ash/shell/example_factory.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 private: | 138 private: |
139 Type type_; | 139 Type type_; |
140 | 140 |
141 DISALLOW_COPY_AND_ASSIGN(WindowTypeShelfItem); | 141 DISALLOW_COPY_AND_ASSIGN(WindowTypeShelfItem); |
142 }; | 142 }; |
143 | 143 |
144 WindowTypeShelfItem::WindowTypeShelfItem(const std::string& id, Type type) | 144 WindowTypeShelfItem::WindowTypeShelfItem(const std::string& id, Type type) |
145 : app_list::AppListItem(id), type_(type) { | 145 : app_list::AppListItem(id), type_(type) { |
146 std::string title(GetTitle(type)); | 146 std::string title(GetTitle(type)); |
147 SetIcon(GetIcon(type), false); | 147 SetIcon(GetIcon(type)); |
148 SetName(title); | 148 SetName(title); |
149 } | 149 } |
150 | 150 |
151 WindowTypeShelfItem::~WindowTypeShelfItem() { | 151 WindowTypeShelfItem::~WindowTypeShelfItem() { |
152 } | 152 } |
153 | 153 |
154 // ExampleSearchResult is an app list search result. It provides what icon to | 154 // ExampleSearchResult is an app list search result. It provides what icon to |
155 // show, what should title and details text look like. It also carries the | 155 // show, what should title and details text look like. It also carries the |
156 // matching window launch type so that AppListViewDelegate knows how to open | 156 // matching window launch type so that AppListViewDelegate knows how to open |
157 // it. | 157 // it. |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 }; | 363 }; |
364 | 364 |
365 } // namespace | 365 } // namespace |
366 | 366 |
367 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 367 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
368 return new ExampleAppListViewDelegate; | 368 return new ExampleAppListViewDelegate; |
369 } | 369 } |
370 | 370 |
371 } // namespace shell | 371 } // namespace shell |
372 } // namespace ash | 372 } // namespace ash |
OLD | NEW |