From 23b7ec676e36ff858b11997bb70d262b315c5010 Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Thu, 30 Sep 2010 19:47:05 +0000 Subject: Make it possible to hide "most visited" on nnnnnnntp This implements http://folder/glen/chrome/spec/101_ntp/8_wish&sidebar mocks 2, 5, 6 It's a bit lame to use a bit in the "sections" bitmask to serialize the "should show?" information, but the damage here was done when someone decided to that "THUBMS bit missing" should mean "show a list instead" (instead of adding another bit for that). BUG=55148 TEST=Hover "Most Visited" bar. Close button should appear. Clicking it should hide "Most Visited" area and add a button at the window edge. That button should have a menu that makes it possible to make the "Most Visited" area visible again. Also do this while multiple NTPs are open; the changes made in the front NTP should be synced to the background NTPs. Review URL: http://codereview.chromium.org/3455007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61095 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/dom_ui/shown_sections_handler.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'chrome/browser/dom_ui/shown_sections_handler.h') diff --git a/chrome/browser/dom_ui/shown_sections_handler.h b/chrome/browser/dom_ui/shown_sections_handler.h index a281346..be07735 100644 --- a/chrome/browser/dom_ui/shown_sections_handler.h +++ b/chrome/browser/dom_ui/shown_sections_handler.h @@ -18,8 +18,16 @@ class PrefService; // Currently, only the THUMB and APPS sections can be toggled by the user. Other // sections are shown automatically if they have data, and hidden otherwise. enum Section { - THUMB = 1, - APPS = 64 + // If one of these is set, the corresponding section shows large thumbnails, + // else it shows only a small overview list. + THUMB = 1 << 0, + APPS = 1 << 6, + + // If one of these is set, then the corresponding section is shown minimized + // at the bottom of the NTP and no data is directly visible on the NTP. + MINIMIZED_THUMB = 1 << (0 + 16), + MINIMIZED_RECENT = 1 << (2 + 16), + MINIMIZED_APPS = 1 << (6 + 16), }; class ShownSectionsHandler : public DOMMessageHandler, -- cgit v1.1