OLD | NEW |
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // 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. |
65 // 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 |
66 // support suddenly). | 66 // support suddenly). |
67 virtual bool supports_instant() const; | 67 virtual bool supports_instant() const; |
68 | 68 |
69 // Returns true if the page is the local NTP (i.e. its URL is | 69 // Returns true if the page is the local NTP (i.e. its URL is |
70 // chrome::kChromeSearchLocalNTPURL). | 70 // chrome::kChromeSearchLocalNTPURL). |
71 virtual bool IsLocal() const; | 71 virtual bool IsLocal() const; |
72 | 72 |
73 protected: | 73 protected: |
74 InstantPage(Delegate* delegate, const std::string& instant_url, | 74 InstantPage(Delegate* delegate, |
75 Profile* profile, bool is_incognito); | 75 const std::string& instant_url, |
| 76 Profile* profile); |
76 | 77 |
77 // Sets |web_contents| as the page to communicate with. |web_contents| may be | 78 // Sets |web_contents| as the page to communicate with. |web_contents| may be |
78 // NULL, which effectively stops all communication. | 79 // NULL, which effectively stops all communication. |
79 void SetContents(content::WebContents* web_contents); | 80 void SetContents(content::WebContents* web_contents); |
80 | 81 |
81 Delegate* delegate() const { return delegate_; } | 82 Delegate* delegate() const { return delegate_; } |
82 | 83 |
83 Profile* profile() const { return profile_; } | 84 Profile* profile() const { return profile_; } |
84 | 85 |
85 // These functions are called before processing messages received from the | 86 // These functions are called before processing messages received from the |
(...skipping 26 matching lines...) Expand all Loading... |
112 void InstantSupportDetermined(bool supports_instant); | 113 void InstantSupportDetermined(bool supports_instant); |
113 | 114 |
114 void ClearContents(); | 115 void ClearContents(); |
115 | 116 |
116 // TODO(kmadhusu): Remove |profile_| from here and update InstantNTP to get | 117 // TODO(kmadhusu): Remove |profile_| from here and update InstantNTP to get |
117 // |profile| from InstantNTPPrerenderer. | 118 // |profile| from InstantNTPPrerenderer. |
118 Profile* profile_; | 119 Profile* profile_; |
119 | 120 |
120 Delegate* const delegate_; | 121 Delegate* const delegate_; |
121 const std::string instant_url_; | 122 const std::string instant_url_; |
122 const bool is_incognito_; | |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(InstantPage); | 124 DISALLOW_COPY_AND_ASSIGN(InstantPage); |
125 }; | 125 }; |
126 | 126 |
127 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ | 127 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
OLD | NEW |