OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 | 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/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.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 NotificationDetails; | 26 class NotificationDetails; |
26 class NotificationSource; | 27 class NotificationSource; |
27 class WebContents; | 28 class WebContents; |
28 } | 29 } |
29 | 30 |
30 namespace gfx { | 31 namespace gfx { |
31 class Rect; | 32 class Rect; |
32 } | 33 } |
(...skipping 29 matching lines...) Expand all Loading... |
62 | 63 |
63 // Tells the preview page of the bounds of the omnibox dropdown (in screen | 64 // Tells the preview page of the bounds of the omnibox dropdown (in screen |
64 // coordinates). This is used by the page to offset the results to avoid them | 65 // coordinates). This is used by the page to offset the results to avoid them |
65 // being covered by the omnibox dropdown. | 66 // being covered by the omnibox dropdown. |
66 void SetOmniboxBounds(const gfx::Rect& bounds); | 67 void SetOmniboxBounds(const gfx::Rect& bounds); |
67 | 68 |
68 // Tells the preview page about the available autocomplete results. | 69 // Tells the preview page about the available autocomplete results. |
69 void SendAutocompleteResults( | 70 void SendAutocompleteResults( |
70 const std::vector<InstantAutocompleteResult>& results); | 71 const std::vector<InstantAutocompleteResult>& results); |
71 | 72 |
| 73 // Tells the preview page about the current theme background. |
| 74 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); |
| 75 |
| 76 // Tells the preview page about the current theme area height. |
| 77 void SendThemeAreaHeight(int height); |
| 78 |
72 // Tells the preview page that the user pressed the up or down key. |count| | 79 // Tells the preview page that the user pressed the up or down key. |count| |
73 // is a repeat count, negative for moving up, positive for moving down. | 80 // is a repeat count, negative for moving up, positive for moving down. |
74 void OnUpOrDownKeyPressed(int count); | 81 void OnUpOrDownKeyPressed(int count); |
75 | 82 |
76 // Tells the preview page that the searchbox has been focused. | 83 // Tells the preview page that the searchbox has been focused. |
77 void OnAutocompleteGotFocus(); | 84 void OnAutocompleteGotFocus(); |
78 | 85 |
79 // Tells the preview page that the searchbox has lost focus. | 86 // Tells the preview page that the searchbox has lost focus. |
80 void OnAutocompleteLostFocus(); | 87 void OnAutocompleteLostFocus(); |
81 | 88 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // Used to get notifications about renderers coming and going. | 159 // Used to get notifications about renderers coming and going. |
153 content::NotificationRegistrar registrar_; | 160 content::NotificationRegistrar registrar_; |
154 | 161 |
155 // See comments on the getter above. | 162 // See comments on the getter above. |
156 history::HistoryAddPageArgs last_navigation_; | 163 history::HistoryAddPageArgs last_navigation_; |
157 | 164 |
158 DISALLOW_COPY_AND_ASSIGN(InstantLoader); | 165 DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
159 }; | 166 }; |
160 | 167 |
161 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 168 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
OLD | NEW |