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

Side by Side Diff: chrome/renderer/resources/extensions/searchbox_api.js

Issue 18344010: Completing high dpi support for Instant Extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 var chrome; 5 var chrome;
6 if (!chrome) 6 if (!chrome)
7 chrome = {}; 7 chrome = {};
8 8
9 if (!chrome.embeddedSearch) { 9 if (!chrome.embeddedSearch) {
10 chrome.embeddedSearch = new function() { 10 chrome.embeddedSearch = new function() {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 native function GetThemeBackgroundInfo(); 76 native function GetThemeBackgroundInfo();
77 native function IsInputInProgress(); 77 native function IsInputInProgress();
78 native function LogEvent(); 78 native function LogEvent();
79 native function NavigateContentWindow(); 79 native function NavigateContentWindow();
80 native function UndoAllMostVisitedDeletions(); 80 native function UndoAllMostVisitedDeletions();
81 native function UndoMostVisitedDeletion(); 81 native function UndoMostVisitedDeletion();
82 82
83 function GetMostVisitedItemsWrapper() { 83 function GetMostVisitedItemsWrapper() {
84 var mostVisitedItems = GetMostVisitedItems(); 84 var mostVisitedItems = GetMostVisitedItems();
85 for (var i = 0, item; item = mostVisitedItems[i]; ++i) { 85 for (var i = 0, item; item = mostVisitedItems[i]; ++i) {
86 item.faviconUrl = GenerateFaviconURL(item.renderViewId, item.rid);
86 // These properties are private data and should not be returned to 87 // These properties are private data and should not be returned to
87 // the page. They are only accessible via getMostVisitedItemData(). 88 // the page. They are only accessible via getMostVisitedItemData().
88 item.url = null; 89 item.url = null;
89 item.title = null; 90 item.title = null;
90 item.domain = null; 91 item.domain = null;
91 item.direction = null; 92 item.direction = null;
93 item.renderViewId = null;
92 } 94 }
93 return mostVisitedItems; 95 return mostVisitedItems;
94 } 96 }
95 97
98 function GenerateFaviconURL(renderViewId, rid) {
99 return "chrome-search://favicon/size/16@" +
100 window.devicePixelRatio + "x/" +
101 renderViewId + "/" + rid;
102 }
103
96 // ======================================================================= 104 // =======================================================================
97 // Exported functions 105 // Exported functions
98 // ======================================================================= 106 // =======================================================================
99 this.__defineGetter__('appLauncherEnabled', GetAppLauncherEnabled); 107 this.__defineGetter__('appLauncherEnabled', GetAppLauncherEnabled);
100 this.__defineGetter__('isInputInProgress', IsInputInProgress); 108 this.__defineGetter__('isInputInProgress', IsInputInProgress);
101 this.__defineGetter__('mostVisited', GetMostVisitedItemsWrapper); 109 this.__defineGetter__('mostVisited', GetMostVisitedItemsWrapper);
102 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo); 110 this.__defineGetter__('themeBackgroundInfo', GetThemeBackgroundInfo);
103 111
104 this.deleteMostVisitedItem = function(restrictedId) { 112 this.deleteMostVisitedItem = function(restrictedId) {
105 DeleteMostVisitedItem(restrictedId); 113 DeleteMostVisitedItem(restrictedId);
(...skipping 20 matching lines...) Expand all
126 this.oninputcancel = null; 134 this.oninputcancel = null;
127 this.oninputstart = null; 135 this.oninputstart = null;
128 this.onmostvisitedchange = null; 136 this.onmostvisitedchange = null;
129 this.onthemechange = null; 137 this.onthemechange = null;
130 }; 138 };
131 139
132 // TODO(jered): Remove when google no longer expects this object. 140 // TODO(jered): Remove when google no longer expects this object.
133 chrome.searchBox = this.searchBox; 141 chrome.searchBox = this.searchBox;
134 }; 142 };
135 } 143 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698