summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-30 03:47:26 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-30 03:47:26 +0000
commitd8f16ae0347635889c104a48269805c01901fc05 (patch)
tree1deca02651c41be9b227acf6509d0a1f2daac5b9 /chrome/browser/dom_ui
parentd35d5c76b7d09200bab91116ac19ce2c40adcb18 (diff)
downloadchromium_src-d8f16ae0347635889c104a48269805c01901fc05.zip
chromium_src-d8f16ae0347635889c104a48269805c01901fc05.tar.gz
chromium_src-d8f16ae0347635889c104a48269805c01901fc05.tar.bz2
Experiment with dislodging the Extension Shelf and having it only appear on the New Tab page.
BUG=http://crbug.com/20415 TEST=With the extension toolstrip visible, go to the New Tab page and press Ctrl + Alt + B. Watch the toolstrip merge into the New Tab page and back again into a separate toolstrip (when you press Ctrl + Alt + B again). Also, when you do this on a regular webpage (as opposed to NTP) this should toggle the toolstrip visiblity. Review URL: http://codereview.chromium.org/175017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24864 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/dom_ui.cc3
-rw-r--r--chrome/browser/dom_ui/dom_ui.h11
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc1
3 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc
index 3b0472b..2088427 100644
--- a/chrome/browser/dom_ui/dom_ui.cc
+++ b/chrome/browser/dom_ui/dom_ui.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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.
@@ -18,6 +18,7 @@
DOMUI::DOMUI(TabContents* contents)
: hide_favicon_(false),
force_bookmark_bar_visible_(false),
+ force_extension_shelf_visible_(false),
focus_location_bar_by_default_(false),
should_hide_url_(false),
link_transition_type_(PageTransition::LINK),
diff --git a/chrome/browser/dom_ui/dom_ui.h b/chrome/browser/dom_ui/dom_ui.h
index d5204b1..adc56ab 100644
--- a/chrome/browser/dom_ui/dom_ui.h
+++ b/chrome/browser/dom_ui/dom_ui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 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.
@@ -61,6 +61,12 @@ class DOMUI {
return force_bookmark_bar_visible_;
}
+ // Returns true if the extension shelf should be forced to being visible
+ // (if it contains any items), overriding the user's preference.
+ bool force_extension_shelf_visible() const {
+ return force_extension_shelf_visible_;
+ }
+
// Returns true if the location bar should be focused by default rather than
// the page contents. Some pages will want to use this to encourage the user
// to type in the URL bar.
@@ -116,6 +122,7 @@ class DOMUI {
// bool options default to false. See the public getters for more information.
bool hide_favicon_;
bool force_bookmark_bar_visible_;
+ bool force_extension_shelf_visible_;
bool focus_location_bar_by_default_;
bool should_hide_url_;
string16 overridden_title_; // Defaults to empty string.
@@ -146,7 +153,7 @@ class DOMUI {
class DOMMessageHandler {
public:
DOMMessageHandler() : dom_ui_(NULL) {}
- virtual ~DOMMessageHandler() {};
+ virtual ~DOMMessageHandler() {}
// Attaches |this| to |dom_ui| in order to handle messages from it. Declared
// virtual so that subclasses can do special init work as soon as the dom_ui
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 1742b0a..3f495bc 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -1538,6 +1538,7 @@ NewTabUI::NewTabUI(TabContents* contents)
// Override some options on the DOM UI.
hide_favicon_ = true;
force_bookmark_bar_visible_ = true;
+ force_extension_shelf_visible_ = true;
focus_location_bar_by_default_ = true;
should_hide_url_ = true;
overridden_title_ = WideToUTF16Hack(l10n_util::GetString(IDS_NEW_TAB_TITLE));