| 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_OVERLAY_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // InstantOverlay is used to communicate with an overlay WebContents that it | 25 // InstantOverlay is used to communicate with an overlay WebContents that it |
| 26 // owns and loads the "Instant URL" into. This overlay can appear and disappear | 26 // owns and loads the "Instant URL" into. This overlay can appear and disappear |
| 27 // at will as the user types in the omnibox. | 27 // at will as the user types in the omnibox. |
| 28 class InstantOverlay : public InstantPage, | 28 class InstantOverlay : public InstantPage, |
| 29 public InstantLoader::Delegate { | 29 public InstantLoader::Delegate { |
| 30 public: | 30 public: |
| 31 // Returns the InstantOverlay for |contents| if it's used for Instant. | 31 // Returns the InstantOverlay for |contents| if it's used for Instant. |
| 32 static InstantOverlay* FromWebContents(const content::WebContents* contents); | 32 static InstantOverlay* FromWebContents(const content::WebContents* contents); |
| 33 | 33 |
| 34 InstantOverlay(InstantController* controller, | 34 InstantOverlay(InstantController* controller, |
| 35 const std::string& instant_url); | 35 const std::string& instant_url, |
| 36 bool off_the_record); |
| 36 virtual ~InstantOverlay(); | 37 virtual ~InstantOverlay(); |
| 37 | 38 |
| 38 // Creates a new WebContents and loads |instant_url_| into it. Uses | 39 // Creates a new WebContents and loads |instant_url_| into it. Uses |
| 39 // |active_tab|, if non-NULL, to initialize the size of the WebContents. | 40 // |active_tab|, if non-NULL, to initialize the size of the WebContents. |
| 40 void InitContents(Profile* profile, | 41 void InitContents(Profile* profile, |
| 41 const content::WebContents* active_tab); | 42 const content::WebContents* active_tab); |
| 42 | 43 |
| 43 // Releases the overlay WebContents. This should be called when the overlay | 44 // Releases the overlay WebContents. This should be called when the overlay |
| 44 // is committed. | 45 // is committed. |
| 45 scoped_ptr<content::WebContents> ReleaseContents(); | 46 scoped_ptr<content::WebContents> ReleaseContents(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 103 |
| 103 InstantLoader loader_; | 104 InstantLoader loader_; |
| 104 bool is_stale_; | 105 bool is_stale_; |
| 105 bool is_pointer_down_from_activate_; | 106 bool is_pointer_down_from_activate_; |
| 106 history::HistoryAddPageArgs last_navigation_; | 107 history::HistoryAddPageArgs last_navigation_; |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(InstantOverlay); | 109 DISALLOW_COPY_AND_ASSIGN(InstantOverlay); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_H_ | 112 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_H_ |
| OLD | NEW |