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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Override some options on the Web UI. 72 // Override some options on the Web UI.
73 hide_favicon_ = true; 73 hide_favicon_ = true;
74 74
75 focus_location_bar_by_default_ = true; 75 focus_location_bar_by_default_ = true;
76 should_hide_url_ = true; 76 should_hide_url_ = true;
77 overridden_title_ = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); 77 overridden_title_ = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE);
78 78
79 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more 79 // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more
80 // highly. Note this means we're including clicks on not only most visited 80 // highly. Note this means we're including clicks on not only most visited
81 // thumbnails, but also clicks on recently bookmarked. 81 // thumbnails, but also clicks on recently bookmarked.
82 link_transition_type_ = PageTransition::AUTO_BOOKMARK; 82 link_transition_type_ = content::PAGE_TRANSITION_AUTO_BOOKMARK;
83 83
84 if (!GetProfile()->IsOffTheRecord()) { 84 if (!GetProfile()->IsOffTheRecord()) {
85 PrefService* pref_service = GetProfile()->GetPrefs(); 85 PrefService* pref_service = GetProfile()->GetPrefs();
86 AddMessageHandler((new ShownSectionsHandler(pref_service))->Attach(this)); 86 AddMessageHandler((new ShownSectionsHandler(pref_service))->Attach(this));
87 AddMessageHandler((new browser_sync::ForeignSessionHandler())-> 87 AddMessageHandler((new browser_sync::ForeignSessionHandler())->
88 Attach(this)); 88 Attach(this));
89 AddMessageHandler((new MostVisitedHandler())->Attach(this)); 89 AddMessageHandler((new MostVisitedHandler())->Attach(this));
90 AddMessageHandler((new RecentlyClosedTabsHandler())->Attach(this)); 90 AddMessageHandler((new RecentlyClosedTabsHandler())->Attach(this));
91 AddMessageHandler((new MetricsHandler())->Attach(this)); 91 AddMessageHandler((new MetricsHandler())->Attach(this));
92 if (GetProfile()->IsSyncAccessible()) 92 if (GetProfile()->IsSyncAccessible())
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 SendResponse(request_id, html_bytes); 337 SendResponse(request_id, html_bytes);
338 } 338 }
339 339
340 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { 340 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const {
341 return "text/html"; 341 return "text/html";
342 } 342 }
343 343
344 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const { 344 bool NewTabUI::NewTabHTMLSource::ShouldReplaceExistingSource() const {
345 return false; 345 return false;
346 } 346 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698