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

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

Issue 525793002: Make WebContentsObserver::web_contents() public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 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
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_PAGE_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 virtual void InstantPageAboutToNavigateMainFrame( 49 virtual void InstantPageAboutToNavigateMainFrame(
50 const content::WebContents* contents, 50 const content::WebContents* contents,
51 const GURL& url) = 0; 51 const GURL& url) = 0;
52 52
53 protected: 53 protected:
54 virtual ~Delegate(); 54 virtual ~Delegate();
55 }; 55 };
56 56
57 virtual ~InstantPage(); 57 virtual ~InstantPage();
58 58
59 // The WebContents corresponding to the page we're talking to. May be NULL.
60 content::WebContents* contents() const { return web_contents(); }
61
62 // Returns the Instant URL that was loaded for this page. Returns the empty 59 // Returns the Instant URL that was loaded for this page. Returns the empty
63 // string if no URL was explicitly loaded as is the case for InstantTab. 60 // string if no URL was explicitly loaded as is the case for InstantTab.
64 virtual const std::string& instant_url() const; 61 virtual const std::string& instant_url() const;
65 62
66 // Returns true if the page is known to support the Instant API. This starts 63 // Returns true if the page is known to support the Instant API. This starts
67 // out false, and is set to true whenever we get any message from the page. 64 // out false, and is set to true whenever we get any message from the page.
68 // Once true, it never becomes false (the page isn't expected to drop API 65 // Once true, it never becomes false (the page isn't expected to drop API
69 // support suddenly). 66 // support suddenly).
70 virtual bool supports_instant() const; 67 virtual bool supports_instant() const;
71 68
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Profile* profile_; 118 Profile* profile_;
122 119
123 Delegate* const delegate_; 120 Delegate* const delegate_;
124 const std::string instant_url_; 121 const std::string instant_url_;
125 const bool is_incognito_; 122 const bool is_incognito_;
126 123
127 DISALLOW_COPY_AND_ASSIGN(InstantPage); 124 DISALLOW_COPY_AND_ASSIGN(InstantPage);
128 }; 125 };
129 126
130 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ 127 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_controller.cc ('k') | chrome/browser/ui/search/instant_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698