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

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

Issue 11369137: Implement {Start,Stop}CapturingKeyStrokes for Instant. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Added comment. Created 8 years 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 | « no previous file | chrome/browser/instant/instant_client.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_CLIENT_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // Called upon determination of Instant API support. Usually in response to 43 // Called upon determination of Instant API support. Usually in response to
44 // SetContents() or when the page first finishes loading. 44 // SetContents() or when the page first finishes loading.
45 virtual void InstantSupportDetermined(bool supports_instant) = 0; 45 virtual void InstantSupportDetermined(bool supports_instant) = 0;
46 46
47 // Called when the page wants to be shown. Usually in response to Change(), 47 // Called when the page wants to be shown. Usually in response to Change(),
48 // SendAutocompleteResults() or SearchModeChanged(). 48 // SendAutocompleteResults() or SearchModeChanged().
49 virtual void ShowInstantPreview(InstantShownReason reason, 49 virtual void ShowInstantPreview(InstantShownReason reason,
50 int height, 50 int height,
51 InstantSizeUnits units) = 0; 51 InstantSizeUnits units) = 0;
52 52
53 // Called when the page wants the browser to start capturing user key
54 // strokes.
55 virtual void StartCapturingKeyStrokes() = 0;
56
57 // Called when the page wants the browser to stop capturing user key
58 // strokes.
59 virtual void StopCapturingKeyStrokes() = 0;
60
53 protected: 61 protected:
54 virtual ~Delegate(); 62 virtual ~Delegate();
55 }; 63 };
56 64
57 // Doesn't take ownership of |delegate|. 65 // Doesn't take ownership of |delegate|.
58 explicit InstantClient(Delegate* delegate); 66 explicit InstantClient(Delegate* delegate);
59 virtual ~InstantClient(); 67 virtual ~InstantClient();
60 68
61 // Sets |contents| as the page to communicate with. |contents| can be NULL, 69 // Sets |contents| as the page to communicate with. |contents| can be NULL,
62 // which effectively stops all communication. 70 // which effectively stops all communication.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 content::RenderViewHost* render_view_host) OVERRIDE; 124 content::RenderViewHost* render_view_host) OVERRIDE;
117 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 125 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
118 126
119 void SetSuggestions(int page_id, 127 void SetSuggestions(int page_id,
120 const std::vector<InstantSuggestion>& suggestions); 128 const std::vector<InstantSuggestion>& suggestions);
121 void InstantSupportDetermined(int page_id, bool result); 129 void InstantSupportDetermined(int page_id, bool result);
122 void ShowInstantPreview(int page_id, 130 void ShowInstantPreview(int page_id,
123 InstantShownReason reason, 131 InstantShownReason reason,
124 int height, 132 int height,
125 InstantSizeUnits units); 133 InstantSizeUnits units);
134 void StartCapturingKeyStrokes(int page_id);
135 void StopCapturingKeyStrokes(int page_id);
126 136
127 Delegate* const delegate_; 137 Delegate* const delegate_;
128 138
129 DISALLOW_COPY_AND_ASSIGN(InstantClient); 139 DISALLOW_COPY_AND_ASSIGN(InstantClient);
130 }; 140 };
131 141
132 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ 142 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698