Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: chrome/browser/instant/instant_loader.h

Issue 11413018: alternate ntp: implement searchbox api for instant overlay to adopt themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed scott's comments Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 active tab's "NTP status" has changed. 83 // Tells the preview page that the active tab's "NTP status" has changed.
77 void OnActiveTabModeChanged(bool active_tab_is_ntp); 84 void OnActiveTabModeChanged(bool active_tab_is_ntp);
78 85
79 // Called by the history tab helper with the information that it would have 86 // Called by the history tab helper with the information that it would have
80 // added to the history service had this web contents not been used for 87 // added to the history service had this web contents not been used for
81 // Instant. 88 // Instant.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Used to get notifications about renderers coming and going. 153 // Used to get notifications about renderers coming and going.
147 content::NotificationRegistrar registrar_; 154 content::NotificationRegistrar registrar_;
148 155
149 // See comments on the getter above. 156 // See comments on the getter above.
150 history::HistoryAddPageArgs last_navigation_; 157 history::HistoryAddPageArgs last_navigation_;
151 158
152 DISALLOW_COPY_AND_ASSIGN(InstantLoader); 159 DISALLOW_COPY_AND_ASSIGN(InstantLoader);
153 }; 160 };
154 161
155 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ 162 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698