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

Unified Diff: chrome/browser/banners/app_banner_manager_emulation.cc

Issue 2156113002: Replace AppBannerDataFetcher with InstallableManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@banner-refactor
Patch Set: Naming, includes Created 4 years, 4 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/banners/app_banner_manager_emulation.cc
diff --git a/chrome/browser/banners/app_banner_manager_emulation.cc b/chrome/browser/banners/app_banner_manager_emulation.cc
deleted file mode 100644
index 1fb27f483f1395c1b3b323a85b827d1fc5305e00..0000000000000000000000000000000000000000
--- a/chrome/browser/banners/app_banner_manager_emulation.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/banners/app_banner_manager_emulation.h"
-
-#include "base/command_line.h"
-#include "build/build_config.h"
-#include "chrome/browser/banners/app_banner_data_fetcher_desktop.h"
-#include "ui/display/display.h"
-#include "ui/display/screen.h"
-
-namespace {
-
-// We need to provide web developers with the guidance on the minimum icon
-// size they should list in the manifest. Since the size depends on the
-// device, we pick the baseline being a Nexus 5X-alike device.
-// We make it clear in the 'add to home screen' emulation UI that the
-// size does not correspond to the currently emulated device, but rather is
-// a generic baseline.
-const int kMinimumIconSize = 144;
-
-} // anonymous namespace
-
-DEFINE_WEB_CONTENTS_USER_DATA_KEY(banners::AppBannerManagerEmulation);
-
-namespace banners {
-
-AppBannerDataFetcher* AppBannerManagerEmulation::CreateAppBannerDataFetcher(
- base::WeakPtr<AppBannerDataFetcher::Delegate> weak_delegate,
- bool is_debug_mode) {
-
- // Divide by the current screen density as the data fetcher will multiply
- // it back in when trying to fetch an appropriate icon
- int size = kMinimumIconSize / display::Screen::GetScreen()->
- GetPrimaryDisplay().device_scale_factor();
-
- return new AppBannerDataFetcherDesktop(web_contents(), weak_delegate,
- size, size, is_debug_mode);
-}
-
-AppBannerManagerEmulation::AppBannerManagerEmulation(
- content::WebContents* web_contents)
- : AppBannerManager(web_contents) {
-}
-
-} // namespace banners
« no previous file with comments | « chrome/browser/banners/app_banner_manager_emulation.h ('k') | chrome/browser/banners/app_banner_settings_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698