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

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

Issue 6685002: Wires up ability for page to specify instant auto complete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test and stray char Created 9 years, 9 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "base/timer.h" 12 #include "base/timer.h"
13 #include "chrome/browser/instant/instant_commit_type.h" 13 #include "chrome/browser/instant/instant_commit_type.h"
14 #include "chrome/browser/search_engines/template_url_id.h" 14 #include "chrome/browser/search_engines/template_url_id.h"
15 #include "chrome/common/instant_types.h"
15 #include "chrome/common/page_transition_types.h" 16 #include "chrome/common/page_transition_types.h"
16 #include "content/common/notification_observer.h" 17 #include "content/common/notification_observer.h"
17 #include "content/common/notification_registrar.h" 18 #include "content/common/notification_registrar.h"
18 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
19 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
20 21
21 class InstantLoaderDelegate; 22 class InstantLoaderDelegate;
22 class InstantLoaderManagerTest; 23 class InstantLoaderManagerTest;
23 class TabContents; 24 class TabContents;
24 class TabContentsWrapper; 25 class TabContentsWrapper;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 private: 97 private:
97 friend class InstantLoaderManagerTest; 98 friend class InstantLoaderManagerTest;
98 friend class InstantTest; 99 friend class InstantTest;
99 class FrameLoadObserver; 100 class FrameLoadObserver;
100 class PaintObserverImpl; 101 class PaintObserverImpl;
101 class TabContentsDelegateImpl; 102 class TabContentsDelegateImpl;
102 103
103 // Invoked when the page wants to update the suggested text. If |user_text_| 104 // Invoked when the page wants to update the suggested text. If |user_text_|
104 // starts with |suggested_text|, then the delegate is notified of the change, 105 // starts with |suggested_text|, then the delegate is notified of the change,
105 // which results in updating the omnibox. 106 // which results in updating the omnibox.
106 void SetCompleteSuggestedText(const string16& suggested_text); 107 void SetCompleteSuggestedText(const string16& suggested_text,
108 InstantCompleteBehavior behavior);
107 109
108 // Invoked when the page paints. 110 // Invoked when the page paints.
109 void PreviewPainted(); 111 void PreviewPainted();
110 112
111 // Invoked to show the preview. This is invoked in two possible cases: when 113 // Invoked to show the preview. This is invoked in two possible cases: when
112 // the renderer paints, or when an auth dialog is shown. This notifies the 114 // the renderer paints, or when an auth dialog is shown. This notifies the
113 // delegate the preview is ready to be shown. 115 // delegate the preview is ready to be shown.
114 void ShowPreview(); 116 void ShowPreview();
115 117
116 // Invoked once the page has finished loading and the script has been sent. 118 // Invoked once the page has finished loading and the script has been sent.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // Used to get notifications about renderers coming and going. 187 // Used to get notifications about renderers coming and going.
186 NotificationRegistrar registrar_; 188 NotificationRegistrar registrar_;
187 189
188 // Last value of verbatim passed to |Update|. 190 // Last value of verbatim passed to |Update|.
189 bool verbatim_; 191 bool verbatim_;
190 192
191 DISALLOW_COPY_AND_ASSIGN(InstantLoader); 193 DISALLOW_COPY_AND_ASSIGN(InstantLoader);
192 }; 194 };
193 195
194 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ 196 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698