Make castv2 performance test work.
[chromium-blink-merge.git] / chrome / browser / search / local_ntp_source.h
blobc4085232817fb30506fe9087638ddbfcdb212c92
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
6 #define CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "content/public/browser/url_data_source.h"
12 class Profile;
14 // Serves HTML and resources for the local new tab page i.e.
15 // chrome-search://local-ntp/local-ntp.html
16 class LocalNtpSource : public content::URLDataSource {
17 public:
18 explicit LocalNtpSource(Profile* profile);
20 private:
21 ~LocalNtpSource() override;
23 // Overridden from content::URLDataSource:
24 std::string GetSource() const override;
25 void StartDataRequest(
26 const std::string& path,
27 int render_process_id,
28 int render_frame_id,
29 const content::URLDataSource::GotDataCallback& callback) override;
30 std::string GetMimeType(const std::string& path) const override;
31 bool ShouldServiceRequest(const net::URLRequest* request) const override;
32 std::string GetContentSecurityPolicyFrameSrc() const override;
34 Profile* profile_;
36 DISALLOW_COPY_AND_ASSIGN(LocalNtpSource);
39 #endif // CHROME_BROWSER_SEARCH_LOCAL_NTP_SOURCE_H_