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

Side by Side Diff: chrome/browser/resources/history/history.js

Issue 1574063003: MD History: Add basic material design history cards and history items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 src="../uber/uber_utils.js"> 5 <include src="../uber/uber_utils.js">
6 <include src="history_focus_manager.js"> 6 <include src="history_focus_manager.js">
7 7
8 /////////////////////////////////////////////////////////////////////////////// 8 ///////////////////////////////////////////////////////////////////////////////
9 // Globals: 9 // Globals:
10 /** @const */ var RESULTS_PER_PAGE = 150; 10 /** @const */ var RESULTS_PER_PAGE = 150;
(...skipping 28 matching lines...) Expand all
39 * supervised_user_url_filter.h. 39 * supervised_user_url_filter.h.
40 * @enum {number} 40 * @enum {number}
41 */ 41 */
42 var SupervisedUserFilteringBehavior = { 42 var SupervisedUserFilteringBehavior = {
43 ALLOW: 0, 43 ALLOW: 0,
44 WARN: 1, 44 WARN: 1,
45 BLOCK: 2 45 BLOCK: 2
46 }; 46 };
47 47
48 /** 48 /**
49 * The type of the history result object. The definition is based on
50 * chrome/browser/ui/webui/history_ui.cc:
51 * BrowsingHistoryHandler::HistoryEntry::ToValue()
52 * @typedef {{allTimestamps: Array<number>,
53 * blockedVisit: (boolean|undefined),
54 * dateRelativeDay: (string|undefined),
55 * dateShort: string,
56 * dateTimeOfDay: (string|undefined),
57 * deviceName: string,
58 * deviceType: string,
59 * domain: string,
60 * hostFilteringBehavior: (number|undefined),
61 * snippet: (string|undefined),
62 * starred: boolean,
63 * time: number,
64 * title: string,
65 * url: string}}
66 */
67 var HistoryEntry;
68
69 /**
70 * The type of the history results info object. The definition is based on
71 * chrome/browser/ui/webui/history_ui.cc:
72 * BrowsingHistoryHandler::QueryComplete()
73 * @typedef {{finished: boolean,
74 * hasSyncedResults: (boolean|undefined),
75 * queryEndTime: string,
76 * queryStartTime: string,
77 * term: string}}
78 */
79 var HistoryQuery;
80
81 /**
82 * Returns true if the mobile (non-desktop) version is being shown. 49 * Returns true if the mobile (non-desktop) version is being shown.
83 * @return {boolean} true if the mobile version is being shown. 50 * @return {boolean} true if the mobile version is being shown.
84 */ 51 */
85 function isMobileVersion() { 52 function isMobileVersion() {
86 return !document.body.classList.contains('uber-frame'); 53 return !document.body.classList.contains('uber-frame');
87 } 54 }
88 55
89 /** 56 /**
90 * Record an action in UMA. 57 * Record an action in UMA.
91 * @param {string} actionDesc The name of the action to be logged. 58 * @param {string} actionDesc The name of the action to be logged.
(...skipping 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 historyView.reload(); 2346 historyView.reload();
2380 } 2347 }
2381 2348
2382 // Add handlers to HTML elements. 2349 // Add handlers to HTML elements.
2383 document.addEventListener('DOMContentLoaded', load); 2350 document.addEventListener('DOMContentLoaded', load);
2384 2351
2385 // This event lets us enable and disable menu items before the menu is shown. 2352 // This event lets us enable and disable menu items before the menu is shown.
2386 document.addEventListener('canExecute', function(e) { 2353 document.addEventListener('canExecute', function(e) {
2387 e.canExecute = true; 2354 e.canExecute = true;
2388 }); 2355 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698