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

Side by Side Diff: chrome/browser/extensions/extension_prefs.h

Issue 7717012: ntp4: default to 18 apps per page for new installs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove checks Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Sets the order that toolstrip URLs appear in the shelf. 94 // Sets the order that toolstrip URLs appear in the shelf.
95 void SetShelfToolstripOrder(const URLList& urls); 95 void SetShelfToolstripOrder(const URLList& urls);
96 96
97 // Get the order that the browser actions appear in the toolbar. 97 // Get the order that the browser actions appear in the toolbar.
98 std::vector<std::string> GetToolbarOrder(); 98 std::vector<std::string> GetToolbarOrder();
99 99
100 // Set the order that the browser actions appear in the toolbar. 100 // Set the order that the browser actions appear in the toolbar.
101 void SetToolbarOrder(const std::vector<std::string>& extension_ids); 101 void SetToolbarOrder(const std::vector<std::string>& extension_ids);
102 102
103 // Called when an extension is installed, so that prefs get created. 103 // Called when an extension is installed, so that prefs get created.
104 // If |page_index| is -1, and the then a page will be found for the App.
Mihai Parparita -not on Chrome 2011/08/25 18:27:08 Nit: "and the then" doesn't sound quite right and
Evan Stade 2011/08/25 18:50:49 you're right on both counts.
104 void OnExtensionInstalled(const Extension* extension, 105 void OnExtensionInstalled(const Extension* extension,
105 Extension::State initial_state, 106 Extension::State initial_state,
106 bool from_webstore, 107 bool from_webstore,
107 int page_index); 108 int page_index);
108 109
109 // Called when an extension is uninstalled, so that prefs get cleaned up. 110 // Called when an extension is uninstalled, so that prefs get cleaned up.
110 void OnExtensionUninstalled(const std::string& extension_id, 111 void OnExtensionUninstalled(const std::string& extension_id,
111 const Extension::Location& location, 112 const Extension::Location& location,
112 bool external_uninstall); 113 bool external_uninstall);
113 114
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // index a -1 value is returned. 271 // index a -1 value is returned.
271 int GetAppLaunchIndex(const std::string& extension_id); 272 int GetAppLaunchIndex(const std::string& extension_id);
272 273
273 // Sets a specific launch index for an extension with |extension_id|. 274 // Sets a specific launch index for an extension with |extension_id|.
274 void SetAppLaunchIndex(const std::string& extension_id, int index); 275 void SetAppLaunchIndex(const std::string& extension_id, int index);
275 276
276 // Gets the next available application launch index. This is 1 higher than the 277 // Gets the next available application launch index. This is 1 higher than the
277 // highest current application launch index found for the page |on_page|. 278 // highest current application launch index found for the page |on_page|.
278 int GetNextAppLaunchIndex(int on_page); 279 int GetNextAppLaunchIndex(int on_page);
279 280
281 // Gets the page a new app should install to. Starts on page 0, and if there
282 // are N or more apps on it, tries to install on the next page.
283 int GetNaturalAppPageIndex();
284
280 // Sets the order the apps should be displayed in the app launcher. 285 // Sets the order the apps should be displayed in the app launcher.
281 void SetAppLauncherOrder(const std::vector<std::string>& extension_ids); 286 void SetAppLauncherOrder(const std::vector<std::string>& extension_ids);
282 287
283 // Get the application page index for an extension with |extension_id|. This 288 // Get the application page index for an extension with |extension_id|. This
284 // determines which page an app will appear on in page-based NTPs. If 289 // determines which page an app will appear on in page-based NTPs. If
285 // the app has no page specified, -1 is returned. 290 // the app has no page specified, -1 is returned.
286 int GetPageIndex(const std::string& extension_id); 291 int GetPageIndex(const std::string& extension_id);
287 292
288 // Sets a specific page index for an extension with |extension_id|. 293 // Sets a specific page index for an extension with |extension_id|.
289 void SetPageIndex(const std::string& extension_id, int index); 294 void SetPageIndex(const std::string& extension_id, int index);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 486
482 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; 487 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_;
483 488
484 // The URLs of all of the toolstrips. 489 // The URLs of all of the toolstrips.
485 URLList shelf_order_; 490 URLList shelf_order_;
486 491
487 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 492 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
488 }; 493 };
489 494
490 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 495 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698