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

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

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 "chrome/browser/ui/webui/ntp/new_tab_page_handler.h" 5 #include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/extensions/default_apps_trial.h" 13 #include "chrome/browser/extensions/default_apps_trial.h"
14 #include "chrome/browser/prefs/pref_service.h" 14 #include "chrome/browser/prefs/pref_service.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/sync/profile_sync_service.h" 16 #include "chrome/browser/sync/profile_sync_service.h"
17 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 17 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
18 #include "chrome/browser/web_resource/notification_promo.h" 18 #include "chrome/browser/web_resource/notification_promo.h"
19 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
20 #include "content/browser/webui/web_ui.h"
20 #include "content/public/browser/notification_service.h" 21 #include "content/public/browser/notification_service.h"
21 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
22 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
23 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
24 25
25 static const int kIntroDisplayMax = 10; 26 static const int kIntroDisplayMax = 10;
26 27
27 // The URL of a knowledge-base article about the new NTP. 28 // The URL of a knowledge-base article about the new NTP.
28 static const char kNTP4IntroURL[] = 29 static const char kNTP4IntroURL[] =
29 "http://www.google.com/support/chrome/bin/answer.py?answer=95451"; 30 "http://www.google.com/support/chrome/bin/answer.py?answer=95451";
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // is only called during startup before the ntp resource cache is constructed. 182 // is only called during startup before the ntp resource cache is constructed.
182 } 183 }
183 184
184 void NewTabPageHandler::Notify(chrome::NotificationType notification_type) { 185 void NewTabPageHandler::Notify(chrome::NotificationType notification_type) {
185 content::NotificationService* service = 186 content::NotificationService* service =
186 content::NotificationService::current(); 187 content::NotificationService::current();
187 service->Notify(notification_type, 188 service->Notify(notification_type,
188 content::Source<NewTabPageHandler>(this), 189 content::Source<NewTabPageHandler>(this),
189 content::NotificationService::NoDetails()); 190 content::NotificationService::NoDetails());
190 } 191 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_handler.h ('k') | chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698