Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 10967003: Add desktop type context to most existing instances of FindTabbedBrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving check_deps exception to specific_include_rules after chat with Kai. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698