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

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

Issue 11779019: browser: Move FindTabbedBrowser() function into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
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_per_app.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 return profile_->GetExtensionService()->GetInstalledExtension(app_id); 737 return profile_->GetExtensionService()->GetInstalledExtension(app_id);
738 } 738 }
739 739
740 void ChromeLauncherControllerPerApp::OnBrowserShortcutClicked( 740 void ChromeLauncherControllerPerApp::OnBrowserShortcutClicked(
741 int event_flags) { 741 int event_flags) {
742 if (event_flags & ui::EF_CONTROL_DOWN) { 742 if (event_flags & ui::EF_CONTROL_DOWN) {
743 CreateNewWindow(); 743 CreateNewWindow();
744 return; 744 return;
745 } 745 }
746 746
747 Browser* last_browser = browser::FindTabbedBrowser( 747 Browser* last_browser = chrome::FindTabbedBrowser(
748 GetProfileForNewWindows(), true, chrome::HOST_DESKTOP_TYPE_ASH); 748 GetProfileForNewWindows(), true, chrome::HOST_DESKTOP_TYPE_ASH);
749 749
750 if (!last_browser) { 750 if (!last_browser) {
751 CreateNewWindow(); 751 CreateNewWindow();
752 return; 752 return;
753 } 753 }
754 754
755 aura::Window* window = last_browser->window()->GetNativeWindow(); 755 aura::Window* window = last_browser->window()->GetNativeWindow();
756 window->Show(); 756 window->Show();
757 ash::wm::ActivateWindow(window); 757 ash::wm::ActivateWindow(window);
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 FaviconTabHelper* favicon_tab_helper = 1234 FaviconTabHelper* favicon_tab_helper =
1235 FaviconTabHelper::FromWebContents(web_contents); 1235 FaviconTabHelper::FromWebContents(web_contents);
1236 gfx::Image app_icon = favicon_tab_helper->GetFavicon(); 1236 gfx::Image app_icon = favicon_tab_helper->GetFavicon();
1237 items->push_back(new ChromeLauncherAppMenuItemBrowser( 1237 items->push_back(new ChromeLauncherAppMenuItemBrowser(
1238 web_contents->GetTitle(), 1238 web_contents->GetTitle(),
1239 app_icon.IsEmpty() ? NULL : &app_icon, 1239 app_icon.IsEmpty() ? NULL : &app_icon,
1240 browser)); 1240 browser));
1241 } 1241 }
1242 return items; 1242 return items;
1243 } 1243 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698