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

Side by Side Diff: chrome/browser/ui/search/instant_search_prerenderer.h

Issue 609493002: Propagate the search request params from the browser to the Instant search base page to fix the embe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const gfx::Size& size); 54 const gfx::Size& size);
55 55
56 // Cancels the current request. 56 // Cancels the current request.
57 void Cancel(); 57 void Cancel();
58 58
59 // Tells the Instant search base page to prerender |suggestion|. 59 // Tells the Instant search base page to prerender |suggestion|.
60 void Prerender(const InstantSuggestion& suggestion); 60 void Prerender(const InstantSuggestion& suggestion);
61 61
62 // Tells the Instant search base page to render the search results for the 62 // Tells the Instant search base page to render the search results for the
63 // given |query|. 63 // given |query|.
64 void Commit(const base::string16& query); 64 void Commit(const base::string16& query,
65 const EmbeddedSearchRequestParams& params);
65 66
66 // Returns true if the prerendered page can be used to process the search for 67 // Returns true if the prerendered page can be used to process the search for
67 // the given |source|. 68 // the given |source|.
68 bool CanCommitQuery(content::WebContents* source, 69 bool CanCommitQuery(content::WebContents* source,
69 const base::string16& query) const; 70 const base::string16& query) const;
70 71
71 // Returns true and updates |params->target_contents| if a prerendered page 72 // Returns true and updates |params->target_contents| if a prerendered page
72 // exists for |url| and is swapped in. 73 // exists for |url| and is swapped in.
73 bool UsePrerenderedPage(const GURL& url, chrome::NavigateParams* params); 74 bool UsePrerenderedPage(const GURL& url, chrome::NavigateParams* params);
74 75
(...skipping 22 matching lines...) Expand all
97 const GURL prerender_url_; 98 const GURL prerender_url_;
98 99
99 scoped_ptr<prerender::PrerenderHandle> prerender_handle_; 100 scoped_ptr<prerender::PrerenderHandle> prerender_handle_;
100 101
101 InstantSuggestion last_instant_suggestion_; 102 InstantSuggestion last_instant_suggestion_;
102 103
103 DISALLOW_COPY_AND_ASSIGN(InstantSearchPrerenderer); 104 DISALLOW_COPY_AND_ASSIGN(InstantSearchPrerenderer);
104 }; 105 };
105 106
106 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ 107 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_controller.cc ('k') | chrome/browser/ui/search/instant_search_prerenderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698