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

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

Issue 13375003: Fixing iframe jank in the local omnibox popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include missing file. Created 7 years, 8 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
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_SEARCH_SUGGESTION_SOURCE_H_
6 #define CHROME_BROWSER_SEARCH_SUGGESTION_SOURCE_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "content/public/browser/url_data_source.h"
11
12 // Serves HTML for displaying suggestions using iframes, e.g.
13 // chrome-search://suggestion/loader.html
14 class SuggestionSource : public content::URLDataSource {
15 public:
16 SuggestionSource();
17 virtual ~SuggestionSource();
18
19 // Overridden from content::URLDataSource:
samarth 2013/04/02 23:26:58 These can be private.
Jered 2013/04/04 17:30:10 Done.
20 virtual std::string GetSource() OVERRIDE;
21 virtual void StartDataRequest(
22 const std::string& path,
23 bool is_incognito,
24 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
25 virtual std::string GetMimeType(const std::string& path) const OVERRIDE;
26 virtual bool ShouldDenyXFrameOptions() const OVERRIDE;
27 virtual bool ShouldServiceRequest(
28 const net::URLRequest* request) const OVERRIDE;
29
30 private:
31 // Sends unmodified resource bytes.
32 void SendResource(
33 int resource_id,
34 const content::URLDataSource::GotDataCallback& callback);
35
36 // Sends Javascript with a parameter substituted.
37 void SendJSWithOrigin(
38 int resource_id,
39 const std::string& path,
40 const content::URLDataSource::GotDataCallback& callback);
41
42 DISALLOW_COPY_AND_ASSIGN(SuggestionSource);
43 };
44
45 #endif // CHROME_BROWSER_SEARCH_SUGGESTION_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698