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

Side by Side Diff: chrome/browser/search/local_ntp_source.h

Issue 19054012: Reload Local NTP on default search provider change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 5 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
« no previous file with comments | « chrome/browser/search/instant_service.cc ('k') | chrome/browser/search/local_ntp_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
6 #define CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ 6 #define CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/public/browser/url_data_source.h" 10 #include "content/public/browser/url_data_source.h"
11 11
12 class Profile;
13
12 // Serves HTML and resources for the local new tab page i.e. 14 // Serves HTML and resources for the local new tab page i.e.
13 // chrome-search://local-ntp/local-ntp.html 15 // chrome-search://local-ntp/local-ntp.html
14 class LocalNtpSource : public content::URLDataSource { 16 class LocalNtpSource : public content::URLDataSource {
15 public: 17 public:
16 LocalNtpSource(); 18 explicit LocalNtpSource(Profile* profile);
17 19
18 private: 20 private:
19 virtual ~LocalNtpSource(); 21 virtual ~LocalNtpSource();
20 22
21 // Overridden from content::URLDataSource: 23 // Overridden from content::URLDataSource:
22 virtual std::string GetSource() const OVERRIDE; 24 virtual std::string GetSource() const OVERRIDE;
23 virtual void StartDataRequest( 25 virtual void StartDataRequest(
24 const std::string& path, 26 const std::string& path,
25 int render_process_id, 27 int render_process_id,
26 int render_view_id, 28 int render_view_id,
27 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; 29 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
28 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; 30 virtual std::string GetMimeType(const std::string& path) const OVERRIDE;
29 virtual bool ShouldServiceRequest( 31 virtual bool ShouldServiceRequest(
30 const net::URLRequest* request) const OVERRIDE; 32 const net::URLRequest* request) const OVERRIDE;
31 virtual std::string GetContentSecurityPolicyFrameSrc() const OVERRIDE; 33 virtual std::string GetContentSecurityPolicyFrameSrc() const OVERRIDE;
32 34
35 Profile* profile_;
36
33 DISALLOW_COPY_AND_ASSIGN(LocalNtpSource); 37 DISALLOW_COPY_AND_ASSIGN(LocalNtpSource);
34 }; 38 };
35 39
36 #endif // CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_ 40 #endif // CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/instant_service.cc ('k') | chrome/browser/search/local_ntp_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698