summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search/most_visited_iframe_source.h
blob: 7344cc82724f920054e914ea0979733c0f9cd663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_
#define CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/search/iframe_source.h"

// Serves HTML for displaying suggestions using iframes, e.g.
// chrome-search://suggestion/loader.html
class MostVisitedIframeSource : public IframeSource {
 public:
  MostVisitedIframeSource();
  virtual ~MostVisitedIframeSource();

  // Number of Most Visited elements on the NTP for logging purposes.
  static const int kNumMostVisited;
  // Name of the histogram keeping track of Most Visited clicks.
  static const char kMostVisitedHistogramName[];

  // Overridden from IframeSource. Public for testing.
  virtual void StartDataRequest(
      const std::string& path_and_query,
      int render_process_id,
      int render_view_id,
      const content::URLDataSource::GotDataCallback& callback) OVERRIDE;

 protected:
  // Overridden from IframeSource:
  virtual std::string GetSource() const OVERRIDE;

  virtual bool ServesPath(const std::string& path) const OVERRIDE;

  DISALLOW_COPY_AND_ASSIGN(MostVisitedIframeSource);
};

#endif  // CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_