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

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

Issue 13460012: Move IconsHandler from c/c/e/api/ to c/c/e (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for CQ Created 7 years, 8 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
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/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/launcher/launcher_model.h" 10 #include "ash/launcher/launcher_model.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/browser/ui/browser_list.h" 46 #include "chrome/browser/ui/browser_list.h"
47 #include "chrome/browser/ui/browser_tabstrip.h" 47 #include "chrome/browser/ui/browser_tabstrip.h"
48 #include "chrome/browser/ui/browser_window.h" 48 #include "chrome/browser/ui/browser_window.h"
49 #include "chrome/browser/ui/extensions/application_launch.h" 49 #include "chrome/browser/ui/extensions/application_launch.h"
50 #include "chrome/browser/ui/extensions/extension_enable_flow.h" 50 #include "chrome/browser/ui/extensions/extension_enable_flow.h"
51 #include "chrome/browser/ui/host_desktop.h" 51 #include "chrome/browser/ui/host_desktop.h"
52 #include "chrome/browser/ui/tabs/tab_strip_model.h" 52 #include "chrome/browser/ui/tabs/tab_strip_model.h"
53 #include "chrome/browser/web_applications/web_app.h" 53 #include "chrome/browser/web_applications/web_app.h"
54 #include "chrome/common/chrome_notification_types.h" 54 #include "chrome/common/chrome_notification_types.h"
55 #include "chrome/common/chrome_switches.h" 55 #include "chrome/common/chrome_switches.h"
56 #include "chrome/common/extensions/api/icons/icons_handler.h"
57 #include "chrome/common/extensions/extension.h" 56 #include "chrome/common/extensions/extension.h"
57 #include "chrome/common/extensions/manifest_handlers/icons_handler.h"
58 #include "chrome/common/pref_names.h" 58 #include "chrome/common/pref_names.h"
59 #include "chrome/common/url_constants.h" 59 #include "chrome/common/url_constants.h"
60 #include "content/public/browser/navigation_entry.h" 60 #include "content/public/browser/navigation_entry.h"
61 #include "content/public/browser/notification_service.h" 61 #include "content/public/browser/notification_service.h"
62 #include "content/public/browser/web_contents.h" 62 #include "content/public/browser/web_contents.h"
63 #include "extensions/common/extension_resource.h" 63 #include "extensions/common/extension_resource.h"
64 #include "extensions/common/url_pattern.h" 64 #include "extensions/common/url_pattern.h"
65 #include "grit/ash_resources.h" 65 #include "grit/ash_resources.h"
66 #include "grit/chromium_strings.h" 66 #include "grit/chromium_strings.h"
67 #include "grit/generated_resources.h" 67 #include "grit/generated_resources.h"
68 #include "grit/theme_resources.h" 68 #include "grit/theme_resources.h"
69 #include "grit/ui_resources.h" 69 #include "grit/ui_resources.h"
70 #include "ui/aura/root_window.h" 70 #include "ui/aura/root_window.h"
71 #include "ui/aura/window.h" 71 #include "ui/aura/window.h"
72 #include "ui/base/l10n/l10n_util.h" 72 #include "ui/base/l10n/l10n_util.h"
73 73
74
75 using extensions::Extension; 74 using extensions::Extension;
76 using content::WebContents; 75 using content::WebContents;
77 76
78 namespace { 77 namespace {
79 78
80 std::string GetPrefKeyForRootWindow(aura::RootWindow* root_window) { 79 std::string GetPrefKeyForRootWindow(aura::RootWindow* root_window) {
81 gfx::Display display = gfx::Screen::GetScreenFor( 80 gfx::Display display = gfx::Screen::GetScreenFor(
82 root_window)->GetDisplayNearestWindow(root_window); 81 root_window)->GetDisplayNearestWindow(root_window);
83 DCHECK(display.is_valid()); 82 DCHECK(display.is_valid());
84 83
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName( 1598 GetLauncherIDForAppID(web_app::GetExtensionIdFromApplicationName(
1600 browser->app_name())) <= 0)); 1599 browser->app_name())) <= 0));
1601 } 1600 }
1602 1601
1603 bool ChromeLauncherControllerPerApp::IsIncognito( 1602 bool ChromeLauncherControllerPerApp::IsIncognito(
1604 content::WebContents* web_contents) const { 1603 content::WebContents* web_contents) const {
1605 const Profile* profile = 1604 const Profile* profile =
1606 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 1605 Profile::FromBrowserContext(web_contents->GetBrowserContext());
1607 return profile->IsOffTheRecord() && !profile->IsGuestSession(); 1606 return profile->IsOffTheRecord() && !profile->IsGuestSession();
1608 } 1607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698