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

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: virtual 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
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/search/suggestion_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
(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 protected:
20 virtual bool GetOrigin(
21 int process_id,
22 int render_view_id,
23 std::string* origin) const;
24
25 // Overridden from content::URLDataSource:
26 virtual std::string GetSource() const OVERRIDE;
27 virtual void StartDataRequest(
28 const std::string& path_and_query,
29 int render_process_id,
30 int render_view_id,
31 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
32 virtual std::string GetMimeType(
33 const std::string& path_and_query) const OVERRIDE;
34 virtual bool ShouldDenyXFrameOptions() const OVERRIDE;
35 virtual bool ShouldServiceRequest(
36 const net::URLRequest* request) const OVERRIDE;
37
38 private:
39 // Sends unmodified resource bytes.
40 void SendResource(
41 int resource_id,
42 const content::URLDataSource::GotDataCallback& callback);
43
44 // Sends Javascript with an expected postMessage origin interpolated.
45 void SendJSWithOrigin(
46 int resource_id,
47 int render_process_id,
48 int render_view_id,
49 const content::URLDataSource::GotDataCallback& callback);
50
51 DISALLOW_COPY_AND_ASSIGN(SuggestionSource);
52 };
53
54 #endif // CHROME_BROWSER_SEARCH_SUGGESTION_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/local_ntp_source.cc ('k') | chrome/browser/search/suggestion_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698