| 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 "chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 void ChromeLauncherController::CreateNewTab() { | 352 void ChromeLauncherController::CreateNewTab() { |
| 353 Browser* last_browser = browser::FindTabbedBrowser( | 353 Browser* last_browser = browser::FindTabbedBrowser( |
| 354 GetProfileForNewWindows(), true); | 354 GetProfileForNewWindows(), true); |
| 355 | 355 |
| 356 if (!last_browser) { | 356 if (!last_browser) { |
| 357 CreateNewWindow(); | 357 CreateNewWindow(); |
| 358 return; | 358 return; |
| 359 } | 359 } |
| 360 | 360 |
| 361 last_browser->NewTab(); | 361 last_browser->NewTab(); |
| 362 aura::Window* window = last_browser->window()->GetNativeHandle(); | 362 aura::Window* window = last_browser->window()->GetNativeWindow(); |
| 363 window->Show(); | 363 window->Show(); |
| 364 ash::wm::ActivateWindow(window); | 364 ash::wm::ActivateWindow(window); |
| 365 } | 365 } |
| 366 | 366 |
| 367 void ChromeLauncherController::CreateNewWindow() { | 367 void ChromeLauncherController::CreateNewWindow() { |
| 368 Browser::NewEmptyWindow(GetProfileForNewWindows()); | 368 Browser::NewEmptyWindow(GetProfileForNewWindows()); |
| 369 } | 369 } |
| 370 | 370 |
| 371 void ChromeLauncherController::ItemClicked(const ash::LauncherItem& item, | 371 void ChromeLauncherController::ItemClicked(const ash::LauncherItem& item, |
| 372 int event_flags) { | 372 int event_flags) { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 } | 725 } |
| 726 model_->AddAt(index, item); | 726 model_->AddAt(index, item); |
| 727 | 727 |
| 728 if (!controller || controller->type() != | 728 if (!controller || controller->type() != |
| 729 BrowserLauncherItemController::TYPE_EXTENSION_PANEL) { | 729 BrowserLauncherItemController::TYPE_EXTENSION_PANEL) { |
| 730 if (item.status != ash::STATUS_IS_PENDING) | 730 if (item.status != ash::STATUS_IS_PENDING) |
| 731 app_icon_loader_->FetchImage(app_id); | 731 app_icon_loader_->FetchImage(app_id); |
| 732 } | 732 } |
| 733 return id; | 733 return id; |
| 734 } | 734 } |
| OLD | NEW |