| 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/gtest_prod_util.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "chrome/browser/ui/search/search_model_observer.h" | 14 #include "chrome/browser/ui/search/search_model_observer.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 15 #include "content/public/browser/web_contents_observer.h" |
| 16 #include "content/public/common/page_transition_types.h" | 16 #include "ui/base/page_transition_types.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 class Profile; | 19 class Profile; |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 struct FrameNavigateParams; | 22 struct FrameNavigateParams; |
| 23 struct LoadCommittedDetails; | 23 struct LoadCommittedDetails; |
| 24 class WebContents; | 24 class WebContents; |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 FRIEND_TEST_ALL_PREFIXES(InstantPageTest, | 95 FRIEND_TEST_ALL_PREFIXES(InstantPageTest, |
| 96 DetermineIfPageSupportsInstant_NonLocal); | 96 DetermineIfPageSupportsInstant_NonLocal); |
| 97 FRIEND_TEST_ALL_PREFIXES(InstantPageTest, | 97 FRIEND_TEST_ALL_PREFIXES(InstantPageTest, |
| 98 PageURLDoesntBelongToInstantRenderer); | 98 PageURLDoesntBelongToInstantRenderer); |
| 99 FRIEND_TEST_ALL_PREFIXES(InstantPageTest, PageSupportsInstant); | 99 FRIEND_TEST_ALL_PREFIXES(InstantPageTest, PageSupportsInstant); |
| 100 | 100 |
| 101 // Overridden from content::WebContentsObserver: | 101 // Overridden from content::WebContentsObserver: |
| 102 virtual void DidCommitProvisionalLoadForFrame( | 102 virtual void DidCommitProvisionalLoadForFrame( |
| 103 content::RenderFrameHost* render_frame_host, | 103 content::RenderFrameHost* render_frame_host, |
| 104 const GURL& url, | 104 const GURL& url, |
| 105 content::PageTransition transition_type) OVERRIDE; | 105 ui::PageTransition transition_type) OVERRIDE; |
| 106 | 106 |
| 107 // Overridden from SearchModelObserver: | 107 // Overridden from SearchModelObserver: |
| 108 virtual void ModelChanged(const SearchModel::State& old_state, | 108 virtual void ModelChanged(const SearchModel::State& old_state, |
| 109 const SearchModel::State& new_state) OVERRIDE; | 109 const SearchModel::State& new_state) OVERRIDE; |
| 110 | 110 |
| 111 // Update the status of Instant support. | 111 // Update the status of Instant support. |
| 112 void InstantSupportDetermined(bool supports_instant); | 112 void InstantSupportDetermined(bool supports_instant); |
| 113 | 113 |
| 114 void ClearContents(); | 114 void ClearContents(); |
| 115 | 115 |
| 116 // TODO(kmadhusu): Remove |profile_| from here and update InstantNTP to get | 116 // TODO(kmadhusu): Remove |profile_| from here and update InstantNTP to get |
| 117 // |profile| from InstantNTPPrerenderer. | 117 // |profile| from InstantNTPPrerenderer. |
| 118 Profile* profile_; | 118 Profile* profile_; |
| 119 | 119 |
| 120 Delegate* const delegate_; | 120 Delegate* const delegate_; |
| 121 const std::string instant_url_; | 121 const std::string instant_url_; |
| 122 const bool is_incognito_; | 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 |