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

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

Issue 11146023: Work on separate browser contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another busted command line flag 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/ash_util.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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 if (!IsActiveBrowserShowingNTP(last_browser)) 644 if (!IsActiveBrowserShowingNTP(last_browser))
645 chrome::NewTab(last_browser); 645 chrome::NewTab(last_browser);
646 646
647 aura::Window* window = last_browser->window()->GetNativeWindow(); 647 aura::Window* window = last_browser->window()->GetNativeWindow();
648 window->Show(); 648 window->Show();
649 ash::wm::ActivateWindow(window); 649 ash::wm::ActivateWindow(window);
650 } 650 }
651 651
652 void ChromeLauncherController::CreateNewWindow() { 652 void ChromeLauncherController::CreateNewWindow() {
653 chrome::NewEmptyWindow(GetProfileForNewWindows()); 653 chrome::NewEmptyWindow(
654 GetProfileForNewWindows(), chrome::HOST_DESKTOP_TYPE_ASH);
654 } 655 }
655 656
656 void ChromeLauncherController::ItemClicked(const ash::LauncherItem& item, 657 void ChromeLauncherController::ItemClicked(const ash::LauncherItem& item,
657 int event_flags) { 658 int event_flags) {
658 DCHECK(HasItemController(item.id)); 659 DCHECK(HasItemController(item.id));
659 id_to_item_controller_map_[item.id]->Clicked(); 660 id_to_item_controller_map_[item.id]->Clicked();
660 } 661 }
661 662
662 int ChromeLauncherController::GetBrowserShortcutResourceId() { 663 int ChromeLauncherController::GetBrowserShortcutResourceId() {
663 return IDR_PRODUCT_LOGO_32; 664 return IDR_PRODUCT_LOGO_32;
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 if (current_tab) { 1061 if (current_tab) {
1061 content::NavigationEntry* active_entry = 1062 content::NavigationEntry* active_entry =
1062 current_tab->GetController().GetActiveEntry(); 1063 current_tab->GetController().GetActiveEntry();
1063 if (active_entry && 1064 if (active_entry &&
1064 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL)) 1065 active_entry->GetURL() == GURL(chrome::kChromeUINewTabURL))
1065 return true; 1066 return true;
1066 } 1067 }
1067 return false; 1068 return false;
1068 } 1069 }
1069 1070
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_util.cc ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698