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

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

Issue 11833043: Instant Extended: Fallback to local preview if the remote instant page is not ready on user input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: Addressing sreeram's comments. Created 7 years, 10 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
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Calls through to methods of the same name on InstantClient. 93 // Calls through to methods of the same name on InstantClient.
94 void Update(const string16& text, 94 void Update(const string16& text,
95 size_t selection_start, 95 size_t selection_start,
96 size_t selection_end, 96 size_t selection_end,
97 bool verbatim); 97 bool verbatim);
98 void Submit(const string16& text); 98 void Submit(const string16& text);
99 void Cancel(const string16& text); 99 void Cancel(const string16& text);
100 void SetPopupBounds(const gfx::Rect& bounds); 100 void SetPopupBounds(const gfx::Rect& bounds);
101 void SetMarginSize(int start, int end); 101 void SetMarginSize(int start, int end);
102 void InitializeFonts();
102 void SendAutocompleteResults( 103 void SendAutocompleteResults(
103 const std::vector<InstantAutocompleteResult>& results); 104 const std::vector<InstantAutocompleteResult>& results);
104 void UpOrDownKeyPressed(int count); 105 void UpOrDownKeyPressed(int count);
105 void SearchModeChanged(const chrome::search::Mode& mode); 106 void SearchModeChanged(const chrome::search::Mode& mode);
106 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); 107 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info);
107 void SendThemeAreaHeight(int height); 108 void SendThemeAreaHeight(int height);
108 void SetDisplayInstantResults(bool display_instant_results); 109 void SetDisplayInstantResults(bool display_instant_results);
109 void KeyCaptureChanged(bool is_key_capture_enabled); 110 void KeyCaptureChanged(bool is_key_capture_enabled);
110 111
111 private: 112 private:
112 class WebContentsDelegateImpl; 113 class WebContentsDelegateImpl;
113 114
114 // Overridden from InstantClient::Delegate: 115 // Overridden from InstantClient::Delegate:
115 virtual void SetSuggestions( 116 virtual void SetSuggestions(
116 const std::vector<InstantSuggestion>& suggestions) OVERRIDE; 117 const std::vector<InstantSuggestion>& suggestions) OVERRIDE;
117 virtual void InstantSupportDetermined(bool supports_instant) OVERRIDE; 118 virtual void InstantSupportDetermined(bool supports_instant) OVERRIDE;
118 virtual void ShowInstantPreview(InstantShownReason reason, 119 virtual void ShowInstantPreview(InstantShownReason reason,
119 int height, 120 int height,
120 InstantSizeUnits units) OVERRIDE; 121 InstantSizeUnits units) OVERRIDE;
121 virtual void StartCapturingKeyStrokes() OVERRIDE; 122 virtual void StartCapturingKeyStrokes() OVERRIDE;
122 virtual void StopCapturingKeyStrokes() OVERRIDE; 123 virtual void StopCapturingKeyStrokes() OVERRIDE;
123 virtual void RenderViewGone() OVERRIDE; 124 virtual void RenderViewGone() OVERRIDE;
124 virtual void AboutToNavigateMainFrame(const GURL& url) OVERRIDE; 125 virtual void AboutToNavigateMainFrame(const GURL& url) OVERRIDE;
125 virtual void NavigateToURL(const GURL& url, 126 virtual void NavigateToURL(const GURL& url,
126 content::PageTransition transition) OVERRIDE; 127 content::PageTransition transition) OVERRIDE;
128 virtual void RenderViewCreated() OVERRIDE;
127 129
128 // Overridden from content::NotificationObserver: 130 // Overridden from content::NotificationObserver:
129 virtual void Observe(int type, 131 virtual void Observe(int type,
130 const content::NotificationSource& source, 132 const content::NotificationSource& source,
131 const content::NotificationDetails& details) OVERRIDE; 133 const content::NotificationDetails& details) OVERRIDE;
132 134
133 void SetupPreviewContents(); 135 void SetupPreviewContents();
134 void CleanupPreviewContents(); 136 void CleanupPreviewContents();
135 void ReplacePreviewContents(content::WebContents* old_contents, 137 void ReplacePreviewContents(content::WebContents* old_contents,
136 content::WebContents* new_contents); 138 content::WebContents* new_contents);
(...skipping 11 matching lines...) Expand all
148 bool is_pointer_down_from_activate_; 150 bool is_pointer_down_from_activate_;
149 history::HistoryAddPageArgs last_navigation_; 151 history::HistoryAddPageArgs last_navigation_;
150 152
151 // Used to get notifications about renderers coming and going. 153 // Used to get notifications about renderers coming and going.
152 content::NotificationRegistrar registrar_; 154 content::NotificationRegistrar registrar_;
153 155
154 DISALLOW_COPY_AND_ASSIGN(InstantLoader); 156 DISALLOW_COPY_AND_ASSIGN(InstantLoader);
155 }; 157 };
156 158
157 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ 159 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_controller.cc ('k') | chrome/browser/instant/instant_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698