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

Unified Diff: components/security_interstitials/core/browser/resources/interstitial_v2_mobile.js

Issue 2894413003: Rename interstitial_v2 files (Closed)
Patch Set: Fix rebase error Created 3 years, 6 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: components/security_interstitials/core/browser/resources/interstitial_v2_mobile.js
diff --git a/components/security_interstitials/core/browser/resources/interstitial_v2_mobile.js b/components/security_interstitials/core/browser/resources/interstitial_v2_mobile.js
deleted file mode 100644
index 655d91f33be946688b3bcb430465bd25d5ab357c..0000000000000000000000000000000000000000
--- a/components/security_interstitials/core/browser/resources/interstitial_v2_mobile.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2015 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.
-
-var mobileNav = false;
-
-/**
- * For small screen mobile the navigation buttons are moved
- * below the advanced text.
- */
-function onResize() {
- var helpOuterBox = document.querySelector('#details');
- var mainContent = document.querySelector('#main-content');
- var mediaQuery = '(min-width: 240px) and (max-width: 420px) and ' +
- '(min-height: 401px), ' +
- '(max-height: 560px) and (min-height: 240px) and ' +
- '(min-width: 421px)';
-
- var detailsHidden = helpOuterBox.classList.contains('hidden');
- var runnerContainer = document.querySelector('.runner-container');
-
- // Check for change in nav status.
- if (mobileNav != window.matchMedia(mediaQuery).matches) {
- mobileNav = !mobileNav;
-
- // Handle showing the top content / details sections according to state.
- if (mobileNav) {
- mainContent.classList.toggle('hidden', !detailsHidden);
- helpOuterBox.classList.toggle('hidden', detailsHidden);
- if (runnerContainer) {
- runnerContainer.classList.toggle('hidden', !detailsHidden);
- }
- } else if (!detailsHidden) {
- // Non mobile nav with visible details.
- mainContent.classList.remove('hidden');
- helpOuterBox.classList.remove('hidden');
- if (runnerContainer) {
- runnerContainer.classList.remove('hidden');
- }
- }
- }
-}
-
-function setupMobileNav() {
- window.addEventListener('resize', onResize);
- onResize();
-}
-
-document.addEventListener('DOMContentLoaded', setupMobileNav);

Powered by Google App Engine
This is Rietveld 408576698