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

Side by Side Diff: chrome/browser/banners/app_banner_manager_desktop.cc

Issue 1308533006: webapps: allow callers of icon downloader/selector to specify a minimum size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webapps-splashscreen-icon
Patch Set: Fix compile Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/banners/app_banner_manager_desktop.h" 5 #include "chrome/browser/banners/app_banner_manager_desktop.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/banners/app_banner_data_fetcher_desktop.h" 8 #include "chrome/browser/banners/app_banner_data_fetcher_desktop.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
11 11
12 namespace { 12 namespace {
13 // TODO(dominickn) Enforce the set of icons which will guarantee the best 13 // TODO(dominickn) Ientify the best minimum icon size to guarantee the best
dominickn 2015/09/14 00:07:09 Nit: "Identify"
Lalit Maganti 2015/09/14 11:35:19 Done.
14 // user experience. 14 // user experience.
15 int kMinimumIconSize = extension_misc::EXTENSION_ICON_LARGE; 15 int kMinimumIconSize = extension_misc::EXTENSION_ICON_LARGE;
16 } // anonymous namespace 16 } // anonymous namespace
17 17
18 DEFINE_WEB_CONTENTS_USER_DATA_KEY(banners::AppBannerManagerDesktop); 18 DEFINE_WEB_CONTENTS_USER_DATA_KEY(banners::AppBannerManagerDesktop);
19 19
20 namespace banners { 20 namespace banners {
21 21
22 bool AppBannerManagerDesktop::IsEnabled() { 22 bool AppBannerManagerDesktop::IsEnabled() {
23 return base::CommandLine::ForCurrentProcess()->HasSwitch( 23 return base::CommandLine::ForCurrentProcess()->HasSwitch(
24 switches::kEnableAddToShelf); 24 switches::kEnableAddToShelf);
25 } 25 }
26 26
27 AppBannerDataFetcher* AppBannerManagerDesktop::CreateAppBannerDataFetcher( 27 AppBannerDataFetcher* AppBannerManagerDesktop::CreateAppBannerDataFetcher(
28 base::WeakPtr<AppBannerDataFetcher::Delegate> weak_delegate, 28 base::WeakPtr<AppBannerDataFetcher::Delegate> weak_delegate) {
29 const int ideal_icon_size) {
30 return new AppBannerDataFetcherDesktop(web_contents(), weak_delegate, 29 return new AppBannerDataFetcherDesktop(web_contents(), weak_delegate,
31 ideal_icon_size); 30 kMinimumIconSize,
31 kMinimumIconSize);
32 } 32 }
33 33
34 AppBannerManagerDesktop::AppBannerManagerDesktop( 34 AppBannerManagerDesktop::AppBannerManagerDesktop(
35 content::WebContents* web_contents) 35 content::WebContents* web_contents)
36 : AppBannerManager(web_contents, kMinimumIconSize) { 36 : AppBannerManager(web_contents) {
37 } 37 }
38 38
39 } // namespace banners 39 } // namespace banners
OLDNEW
« no previous file with comments | « chrome/browser/banners/app_banner_manager_desktop.h ('k') | chrome/browser/manifest/manifest_icon_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698