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

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: Fixing up/down. 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
18 private:
19 virtual ~SuggestionSource();
20
21 // Overridden from content::URLDataSource:
22 virtual std::string GetSource() OVERRIDE;
23 virtual void StartDataRequest(
24 const std::string& path_and_query,
25 bool is_incognito,
26 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
27 virtual std::string GetMimeType(
28 const std::string& path_and_query) const OVERRIDE;
29 virtual bool ShouldDenyXFrameOptions() const OVERRIDE;
30 virtual bool ShouldServiceRequest(
31 const net::URLRequest* request) const OVERRIDE;
32
33 // Sends unmodified resource bytes.
34 void SendResource(
35 int resource_id,
36 const content::URLDataSource::GotDataCallback& callback);
37
38 // Sends Javascript with an &origin parameter interpolated.
39 void SendJSWithOrigin(
40 int resource_id,
41 const std::string& path_and_query,
42 const content::URLDataSource::GotDataCallback& callback);
43
44 DISALLOW_COPY_AND_ASSIGN(SuggestionSource);
45 };
46
47 #endif // CHROME_BROWSER_SEARCH_SUGGESTION_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698