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 <utility> |
6 #include <vector> | 7 #include <vector> |
7 | 8 |
8 #include "ash/session/session_state_delegate.h" | 9 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
10 #include "ash/shell/example_factory.h" | 11 #include "ash/shell/example_factory.h" |
11 #include "ash/shell/toplevel_window.h" | 12 #include "ash/shell/toplevel_window.h" |
12 #include "ash/shell_delegate.h" | 13 #include "ash/shell_delegate.h" |
13 #include "base/callback.h" | 14 #include "base/callback.h" |
14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
15 #include "base/i18n/case_conversion.h" | 16 #include "base/i18n/case_conversion.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 212 } |
212 | 213 |
213 private: | 214 private: |
214 void PopulateApps() { | 215 void PopulateApps() { |
215 for (int i = 0; i < static_cast<int>(WindowTypeShelfItem::LAST_TYPE); ++i) { | 216 for (int i = 0; i < static_cast<int>(WindowTypeShelfItem::LAST_TYPE); ++i) { |
216 WindowTypeShelfItem::Type type = | 217 WindowTypeShelfItem::Type type = |
217 static_cast<WindowTypeShelfItem::Type>(i); | 218 static_cast<WindowTypeShelfItem::Type>(i); |
218 std::string id = base::IntToString(i); | 219 std::string id = base::IntToString(i); |
219 scoped_ptr<WindowTypeShelfItem> shelf_item( | 220 scoped_ptr<WindowTypeShelfItem> shelf_item( |
220 new WindowTypeShelfItem(id, type)); | 221 new WindowTypeShelfItem(id, type)); |
221 model_->AddItem(shelf_item.Pass()); | 222 model_->AddItem(std::move(shelf_item)); |
222 } | 223 } |
223 } | 224 } |
224 | 225 |
225 gfx::ImageSkia CreateSearchBoxIcon() { | 226 gfx::ImageSkia CreateSearchBoxIcon() { |
226 const base::string16 icon_text = base::ASCIIToUTF16("ash"); | 227 const base::string16 icon_text = base::ASCIIToUTF16("ash"); |
227 const gfx::Size icon_size(32, 32); | 228 const gfx::Size icon_size(32, 32); |
228 | 229 |
229 gfx::Canvas canvas(icon_size, 1.0f, false /* is_opaque */); | 230 gfx::Canvas canvas(icon_size, 1.0f, false /* is_opaque */); |
230 canvas.DrawStringRectWithFlags( | 231 canvas.DrawStringRectWithFlags( |
231 icon_text, | 232 icon_text, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 }; | 365 }; |
365 | 366 |
366 } // namespace | 367 } // namespace |
367 | 368 |
368 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 369 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
369 return new ExampleAppListViewDelegate; | 370 return new ExampleAppListViewDelegate; |
370 } | 371 } |
371 | 372 |
372 } // namespace shell | 373 } // namespace shell |
373 } // namespace ash | 374 } // namespace ash |
OLD | NEW |