| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 /////////////////////////////////////////////////////////////////////////////// | 1531 /////////////////////////////////////////////////////////////////////////////// |
| 1532 // NewTabUI | 1532 // NewTabUI |
| 1533 | 1533 |
| 1534 NewTabUI::NewTabUI(TabContents* contents) | 1534 NewTabUI::NewTabUI(TabContents* contents) |
| 1535 : DOMUI(contents), | 1535 : DOMUI(contents), |
| 1536 motd_message_id_(0), | 1536 motd_message_id_(0), |
| 1537 incognito_(false) { | 1537 incognito_(false) { |
| 1538 // Override some options on the DOM UI. | 1538 // Override some options on the DOM UI. |
| 1539 hide_favicon_ = true; | 1539 hide_favicon_ = true; |
| 1540 force_bookmark_bar_visible_ = true; | 1540 force_bookmark_bar_visible_ = true; |
| 1541 force_extension_shelf_visible_ = true; |
| 1541 focus_location_bar_by_default_ = true; | 1542 focus_location_bar_by_default_ = true; |
| 1542 should_hide_url_ = true; | 1543 should_hide_url_ = true; |
| 1543 overridden_title_ = WideToUTF16Hack(l10n_util::GetString(IDS_NEW_TAB_TITLE)); | 1544 overridden_title_ = WideToUTF16Hack(l10n_util::GetString(IDS_NEW_TAB_TITLE)); |
| 1544 | 1545 |
| 1545 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more | 1546 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more |
| 1546 // highly. Note this means we're including clicks on not only most visited | 1547 // highly. Note this means we're including clicks on not only most visited |
| 1547 // thumbnails, but also clicks on recently bookmarked. | 1548 // thumbnails, but also clicks on recently bookmarked. |
| 1548 link_transition_type_ = PageTransition::AUTO_BOOKMARK; | 1549 link_transition_type_ = PageTransition::AUTO_BOOKMARK; |
| 1549 | 1550 |
| 1550 if (NewTabHTMLSource::first_view() && | 1551 if (NewTabHTMLSource::first_view() && |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1647 bool NewTabUI::WebResourcesEnabled() { | 1648 bool NewTabUI::WebResourcesEnabled() { |
| 1648 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1649 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 1649 return !command_line->HasSwitch(switches::kDisableWebResources); | 1650 return !command_line->HasSwitch(switches::kDisableWebResources); |
| 1650 } | 1651 } |
| 1651 | 1652 |
| 1652 // static | 1653 // static |
| 1653 bool NewTabUI::FirstRunDisabled() { | 1654 bool NewTabUI::FirstRunDisabled() { |
| 1654 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1655 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 1655 return command_line->HasSwitch(switches::kDisableNewTabFirstRun); | 1656 return command_line->HasSwitch(switches::kDisableNewTabFirstRun); |
| 1656 } | 1657 } |
| OLD | NEW |