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

Unified Diff: chrome/browser/chromeos/extensions/file_manager_util.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/extensions/file_manager_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc
index 0355a45f87e834cad5334d4bcaf508bf34208474..d44485658265e277edbc3a4d14d421e5702cd7dc 100644
--- a/chrome/browser/chromeos/extensions/file_manager_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager_util.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/extensions/application_launch.h"
+#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -206,7 +207,8 @@ DictionaryValue* ProgessStatusToDictionaryValue(
void OpenNewTab(const GURL& url, Profile* profile) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
Browser* browser = browser::FindOrCreateTabbedBrowser(
- profile ? profile : ProfileManager::GetDefaultProfileOrOffTheRecord());
+ profile ? profile : ProfileManager::GetDefaultProfileOrOffTheRecord(),
+ chrome::HOST_DESKTOP_TYPE_ASH);
chrome::AddSelectedTabWithURL(browser, url, content::PAGE_TRANSITION_LINK);
// If the current browser is not tabbed then the new tab will be created
// in a different browser. Make sure it is visible.
@@ -217,7 +219,9 @@ void OpenNewTab(const GURL& url, Profile* profile) {
void ShowWarningMessageBox(Profile* profile, const FilePath& path) {
// TODO: if FindOrCreateTabbedBrowser creates a new browser the returned
// browser is leaked.
- Browser* browser = browser::FindOrCreateTabbedBrowser(profile);
+ Browser* browser =
+ browser::FindOrCreateTabbedBrowser(profile,
+ chrome::HOST_DESKTOP_TYPE_ASH);
chrome::ShowMessageBox(
browser->window()->GetNativeWindow(),
l10n_util::GetStringFUTF16(
« no previous file with comments | « chrome/browser/chromeos/extensions/file_handler_util.cc ('k') | chrome/browser/chromeos/extensions/wallpaper_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698