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

Side by Side Diff: chrome/renderer/searchbox/search_bouncer.h

Issue 23455047: InstantExtended: Send search URLs to renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing files. Created 7 years, 3 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 (c) 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_RENDERER_SEARCH_BOUNCER_H_
6 #define CHROME_RENDERER_SEARCH_BOUNCER_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "content/public/renderer/render_process_observer.h"
12 #include "url/gurl.h"
13
14 namespace IPC {
15 class Message;
16 }
17
18 // SearchBouncer tracks a set of URLs which should be transferred back to the
19 // browser process for potential reassignment to an Instant renderer process.
20 class SearchBouncer : public content::RenderProcessObserver {
21 public:
22 SearchBouncer();
23 virtual ~SearchBouncer();
24
25 // Returns whether a navigation to |url| should bounce back to the browser as
26 // a potential Instant url. See chrome::ShouldAssignURLToInstantRenderer().
27 bool ShouldFork(const GURL& url) const;
28
29 // Returns whether |url| is a valid Instant new tab page URL.
30 bool IsNewTabPage(const GURL& url) const;
31
32 private:
33 // From RenderProcessObserver:
34 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
35
36 void OnSetSearchURLs(
37 std::vector<GURL> search_urls,
38 GURL new_tab_page_url);
39
40 // URLs to bounce back to the browser.
41 std::vector<GURL> search_urls_;
42 GURL new_tab_page_url_;
43
44 DISALLOW_COPY_AND_ASSIGN(SearchBouncer);
45 };
46
47 #endif // CHROME_RENDERER_SEARCH_BOUNCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698