| 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" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/gtest_prod_util.h" |
| 12 #include "base/string16.h" | 13 #include "base/string16.h" |
| 13 #include "chrome/common/instant_types.h" | 14 #include "chrome/common/instant_types.h" |
| 14 #include "chrome/common/omnibox_focus_state.h" | 15 #include "chrome/common/omnibox_focus_state.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
| 16 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
| 17 | 18 |
| 18 class GURL; | 19 class GURL; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class WebContents; | 22 class WebContents; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // methods. | 193 // methods. |
| 193 virtual bool ShouldProcessRenderViewCreated(); | 194 virtual bool ShouldProcessRenderViewCreated(); |
| 194 virtual bool ShouldProcessRenderViewGone(); | 195 virtual bool ShouldProcessRenderViewGone(); |
| 195 virtual bool ShouldProcessAboutToNavigateMainFrame(); | 196 virtual bool ShouldProcessAboutToNavigateMainFrame(); |
| 196 virtual bool ShouldProcessSetSuggestions(); | 197 virtual bool ShouldProcessSetSuggestions(); |
| 197 virtual bool ShouldProcessShowInstantOverlay(); | 198 virtual bool ShouldProcessShowInstantOverlay(); |
| 198 virtual bool ShouldProcessFocusOmnibox(); | 199 virtual bool ShouldProcessFocusOmnibox(); |
| 199 virtual bool ShouldProcessNavigateToURL(); | 200 virtual bool ShouldProcessNavigateToURL(); |
| 200 | 201 |
| 201 private: | 202 private: |
| 203 FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, UsesOverlayIfTabNotReady); |
| 204 |
| 202 // Overridden from content::WebContentsObserver: | 205 // Overridden from content::WebContentsObserver: |
| 203 virtual void RenderViewCreated( | 206 virtual void RenderViewCreated( |
| 204 content::RenderViewHost* render_view_host) OVERRIDE; | 207 content::RenderViewHost* render_view_host) OVERRIDE; |
| 205 virtual void DidFinishLoad( | 208 virtual void DidFinishLoad( |
| 206 int64 frame_id, | 209 int64 frame_id, |
| 207 const GURL& validated_url, | 210 const GURL& validated_url, |
| 208 bool is_main_frame, | 211 bool is_main_frame, |
| 209 content::RenderViewHost* render_view_host) OVERRIDE; | 212 content::RenderViewHost* render_view_host) OVERRIDE; |
| 210 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 213 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 211 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 214 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 232 void OnUndoAllMostVisitedDeletions(); | 235 void OnUndoAllMostVisitedDeletions(); |
| 233 | 236 |
| 234 Delegate* const delegate_; | 237 Delegate* const delegate_; |
| 235 const std::string instant_url_; | 238 const std::string instant_url_; |
| 236 bool supports_instant_; | 239 bool supports_instant_; |
| 237 | 240 |
| 238 DISALLOW_COPY_AND_ASSIGN(InstantPage); | 241 DISALLOW_COPY_AND_ASSIGN(InstantPage); |
| 239 }; | 242 }; |
| 240 | 243 |
| 241 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ | 244 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
| OLD | NEW |