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

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

Issue 1955183002: Revert of DevTools: account for the display scale factor while validating manifest under emulation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 f18cff7092342b6a85d419235ff4945b4b8ac1bd..0000000000000000000000000000000000000000
--- a/chrome/browser/banners/app_banner_manager_emulation.cc
+++ /dev/null
@@ -1,46 +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/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/chrome_service_worker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698