OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_INSTANT_INSTANT_LOADER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/string16.h" | 14 #include "base/string16.h" |
15 #include "chrome/browser/history/history_types.h" | 15 #include "chrome/browser/history/history_types.h" |
16 #include "chrome/browser/instant/instant_commit_type.h" | 16 #include "chrome/browser/instant/instant_commit_type.h" |
17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
19 | 19 |
20 struct InstantAutocompleteResult; | 20 struct InstantAutocompleteResult; |
21 class InstantController; | 21 class InstantController; |
22 class TabContents; | 22 class TabContents; |
| 23 struct ThemeBackgroundInfo; |
23 | 24 |
24 namespace content { | 25 namespace content { |
25 class WebContents; | 26 class WebContents; |
26 } | 27 } |
27 | 28 |
28 namespace gfx { | 29 namespace gfx { |
29 class Rect; | 30 class Rect; |
30 } | 31 } |
31 | 32 |
32 // InstantLoader is created with an "Instant URL". It loads the URL and tells | 33 // InstantLoader is created with an "Instant URL". It loads the URL and tells |
(...skipping 27 matching lines...) Expand all Loading... |
60 | 61 |
61 // Tells the preview page of the bounds of the omnibox dropdown (in screen | 62 // Tells the preview page of the bounds of the omnibox dropdown (in screen |
62 // coordinates). This is used by the page to offset the results to avoid them | 63 // coordinates). This is used by the page to offset the results to avoid them |
63 // being covered by the omnibox dropdown. | 64 // being covered by the omnibox dropdown. |
64 void SetOmniboxBounds(const gfx::Rect& bounds); | 65 void SetOmniboxBounds(const gfx::Rect& bounds); |
65 | 66 |
66 // Tells the preview page about the available autocomplete results. | 67 // Tells the preview page about the available autocomplete results. |
67 void SendAutocompleteResults( | 68 void SendAutocompleteResults( |
68 const std::vector<InstantAutocompleteResult>& results); | 69 const std::vector<InstantAutocompleteResult>& results); |
69 | 70 |
| 71 // Tells the preview page about the current theme background. |
| 72 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); |
| 73 |
| 74 // Tells the preview page about the current theme area height. |
| 75 void SendThemeAreaHeight(int height); |
| 76 |
70 // Tells the preview page that the user pressed the up or down key. |count| | 77 // Tells the preview page that the user pressed the up or down key. |count| |
71 // is a repeat count, negative for moving up, positive for moving down. | 78 // is a repeat count, negative for moving up, positive for moving down. |
72 void OnUpOrDownKeyPressed(int count); | 79 void OnUpOrDownKeyPressed(int count); |
73 | 80 |
74 // Tells the preview page that the active tab's "NTP status" has changed. | 81 // Tells the preview page that the active tab's "NTP status" has changed. |
75 void OnActiveTabModeChanged(bool active_tab_is_ntp); | 82 void OnActiveTabModeChanged(bool active_tab_is_ntp); |
76 | 83 |
77 // Called by the history tab helper with the information that it would have | 84 // Called by the history tab helper with the information that it would have |
78 // added to the history service had this web contents not been used for | 85 // added to the history service had this web contents not been used for |
79 // Instant. | 86 // Instant. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Used to get notifications about renderers coming and going. | 152 // Used to get notifications about renderers coming and going. |
146 content::NotificationRegistrar registrar_; | 153 content::NotificationRegistrar registrar_; |
147 | 154 |
148 // See comments on the getter above. | 155 // See comments on the getter above. |
149 history::HistoryAddPageArgs last_navigation_; | 156 history::HistoryAddPageArgs last_navigation_; |
150 | 157 |
151 DISALLOW_COPY_AND_ASSIGN(InstantLoader); | 158 DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
152 }; | 159 }; |
153 | 160 |
154 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 161 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
OLD | NEW |