| 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/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 if (id > 0) { | 552 if (id > 0) { |
| 553 // If the window is active, mark the app as active. | 553 // If the window is active, mark the app as active. |
| 554 SetItemStatus(id, app_state == APP_STATE_WINDOW_ACTIVE ? | 554 SetItemStatus(id, app_state == APP_STATE_WINDOW_ACTIVE ? |
| 555 ash::STATUS_ACTIVE : ash::STATUS_RUNNING); | 555 ash::STATUS_ACTIVE : ash::STATUS_RUNNING); |
| 556 } | 556 } |
| 557 } | 557 } |
| 558 } | 558 } |
| 559 | 559 |
| 560 void ChromeLauncherController::CreateNewTab() { | 560 void ChromeLauncherController::CreateNewTab() { |
| 561 Browser* last_browser = browser::FindTabbedBrowser( | 561 Browser* last_browser = browser::FindTabbedBrowser( |
| 562 GetProfileForNewWindows(), true); | 562 GetProfileForNewWindows(), true, chrome::HOST_DESKTOP_TYPE_ASH); |
| 563 | 563 |
| 564 if (!last_browser) { | 564 if (!last_browser) { |
| 565 CreateNewWindow(); | 565 CreateNewWindow(); |
| 566 return; | 566 return; |
| 567 } | 567 } |
| 568 | 568 |
| 569 if (!IsActiveBrowserShowingNTP(last_browser)) | 569 if (!IsActiveBrowserShowingNTP(last_browser)) |
| 570 chrome::NewTab(last_browser); | 570 chrome::NewTab(last_browser); |
| 571 | 571 |
| 572 aura::Window* window = last_browser->window()->GetNativeWindow(); | 572 aura::Window* window = last_browser->window()->GetNativeWindow(); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 if (current_tab) { | 988 if (current_tab) { |
| 989 content::NavigationEntry* active_entry = | 989 content::NavigationEntry* active_entry = |
| 990 current_tab->GetController().GetActiveEntry(); | 990 current_tab->GetController().GetActiveEntry(); |
| 991 if (active_entry && | 991 if (active_entry && |
| 992 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) | 992 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) |
| 993 return true; | 993 return true; |
| 994 } | 994 } |
| 995 return false; | 995 return false; |
| 996 } | 996 } |
| 997 | 997 |
| OLD | NEW |