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

Side by Side Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 8043004: Disable bookmark pane in ntp4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some half arsed css Created 9 years, 3 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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 7 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } // namespace 186 } // namespace
187 187
188 /////////////////////////////////////////////////////////////////////////////// 188 ///////////////////////////////////////////////////////////////////////////////
189 // NewTabUI 189 // NewTabUI
190 190
191 NewTabUI::NewTabUI(TabContents* contents) 191 NewTabUI::NewTabUI(TabContents* contents)
192 : ChromeWebUI(contents) { 192 : ChromeWebUI(contents) {
193 // Override some options on the Web UI. 193 // Override some options on the Web UI.
194 hide_favicon_ = true; 194 hide_favicon_ = true;
195 195
196 if (!NTP4Enabled() && 196 if (GetProfile()->GetPrefs()->GetBoolean(prefs::kEnableBookmarkBar) &&
197 GetProfile()->GetPrefs()->GetBoolean(prefs::kEnableBookmarkBar) &&
198 browser_defaults::bookmarks_enabled) { 197 browser_defaults::bookmarks_enabled) {
199 set_force_bookmark_bar_visible(true); 198 set_force_bookmark_bar_visible(true);
200 } 199 }
201 200
202 focus_location_bar_by_default_ = true; 201 focus_location_bar_by_default_ = true;
203 should_hide_url_ = true; 202 should_hide_url_ = true;
204 overridden_title_ = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); 203 overridden_title_ = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE);
205 204
206 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more 205 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more
207 // highly. Note this means we're including clicks on not only most visited 206 // highly. Note this means we're including clicks on not only most visited
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 SendResponse(request_id, html_bytes); 463 SendResponse(request_id, html_bytes);
465 } 464 }
466 465
467 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { 466 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const {
468 return "text/html"; 467 return "text/html";
469 } 468 }
470 469
471 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const { 470 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const {
472 return false; 471 return false;
473 } 472 }
OLDNEW
« chrome/browser/resources/ntp4/new_tab.css ('K') | « chrome/browser/resources/ntp4/new_tab.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698