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

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_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 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/chromeos/extensions/wallpaper_manager_util.h" 5 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_finder.h" 12 #include "chrome/browser/ui/browser_finder.h"
13 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_list.h"
14 #include "chrome/browser/ui/browser_tabstrip.h" 14 #include "chrome/browser/ui/browser_tabstrip.h"
15 #include "chrome/browser/ui/browser_window.h" 15 #include "chrome/browser/ui/browser_window.h"
16 #include "chrome/browser/ui/chrome_pages.h" 16 #include "chrome/browser/ui/chrome_pages.h"
17 #include "chrome/browser/ui/host_desktop.h"
17 #include "chrome/browser/ui/tab_contents/tab_contents.h" 18 #include "chrome/browser/ui/tab_contents/tab_contents.h"
18 #include "chrome/browser/ui/tabs/tab_strip_model.h" 19 #include "chrome/browser/ui/tabs/tab_strip_model.h"
19 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/extensions/extension_constants.h" 21 #include "chrome/common/extensions/extension_constants.h"
21 #include "chrome/common/url_constants.h" 22 #include "chrome/common/url_constants.h"
22 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
23 #include "ui/gfx/screen.h" 24 #include "ui/gfx/screen.h"
24 25
25 namespace wallpaper_manager_util { 26 namespace wallpaper_manager_util {
26 namespace { 27 namespace {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 extension->name(), 76 extension->name(),
76 bounds, 77 bounds,
77 profile)); 78 profile));
78 79
79 chrome::AddSelectedTabWithURL(browser, wallpaper_picker_url, 80 chrome::AddSelectedTabWithURL(browser, wallpaper_picker_url,
80 content::PAGE_TRANSITION_LINK); 81 content::PAGE_TRANSITION_LINK);
81 } 82 }
82 browser->window()->Show(); 83 browser->window()->Show();
83 } else { 84 } else {
84 Browser* browser = browser::FindOrCreateTabbedBrowser( 85 Browser* browser = browser::FindOrCreateTabbedBrowser(
85 ProfileManager::GetDefaultProfileOrOffTheRecord()); 86 ProfileManager::GetDefaultProfileOrOffTheRecord(),
87 chrome::HOST_DESKTOP_TYPE_ASH);
86 chrome::ShowSettingsSubPage(browser, "setWallpaper"); 88 chrome::ShowSettingsSubPage(browser, "setWallpaper");
87 } 89 }
88 } 90 }
89 91
90 } // namespace wallpaper_manager_util 92 } // namespace wallpaper_manager_util
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager_util.cc ('k') | chrome/browser/chromeos/locale_change_guard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698