| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/new_tab_ui.h" | 7 #include "chrome/browser/dom_ui/new_tab_ui.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 } // namespace | 438 } // namespace |
| 439 | 439 |
| 440 /////////////////////////////////////////////////////////////////////////////// | 440 /////////////////////////////////////////////////////////////////////////////// |
| 441 // NewTabUI | 441 // NewTabUI |
| 442 | 442 |
| 443 NewTabUI::NewTabUI(TabContents* contents) | 443 NewTabUI::NewTabUI(TabContents* contents) |
| 444 : DOMUI(contents) { | 444 : DOMUI(contents) { |
| 445 // Override some options on the DOM UI. | 445 // Override some options on the DOM UI. |
| 446 hide_favicon_ = true; | 446 hide_favicon_ = true; |
| 447 force_bookmark_bar_visible_ = true; | 447 force_bookmark_bar_visible_ = true; |
| 448 force_extension_shelf_visible_ = true; | |
| 449 focus_location_bar_by_default_ = true; | 448 focus_location_bar_by_default_ = true; |
| 450 should_hide_url_ = true; | 449 should_hide_url_ = true; |
| 451 overridden_title_ = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); | 450 overridden_title_ = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); |
| 452 | 451 |
| 453 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more | 452 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more |
| 454 // highly. Note this means we're including clicks on not only most visited | 453 // highly. Note this means we're including clicks on not only most visited |
| 455 // thumbnails, but also clicks on recently bookmarked. | 454 // thumbnails, but also clicks on recently bookmarked. |
| 456 link_transition_type_ = PageTransition::AUTO_BOOKMARK; | 455 link_transition_type_ = PageTransition::AUTO_BOOKMARK; |
| 457 | 456 |
| 458 if (NewTabUI::FirstRunDisabled()) | 457 if (NewTabUI::FirstRunDisabled()) |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 | 651 |
| 653 scoped_refptr<RefCountedBytes> html_bytes = | 652 scoped_refptr<RefCountedBytes> html_bytes = |
| 654 profile_->GetNTPResourceCache()->GetNewTabHTML(is_off_the_record); | 653 profile_->GetNTPResourceCache()->GetNewTabHTML(is_off_the_record); |
| 655 | 654 |
| 656 SendResponse(request_id, html_bytes); | 655 SendResponse(request_id, html_bytes); |
| 657 } | 656 } |
| 658 | 657 |
| 659 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { | 658 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { |
| 660 return "text/html"; | 659 return "text/html"; |
| 661 } | 660 } |
| OLD | NEW |