OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Tells the page about the current theme background. | 109 // Tells the page about the current theme background. |
110 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); | 110 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); |
111 | 111 |
112 // Tells the page about the current theme area height. | 112 // Tells the page about the current theme area height. |
113 void SendThemeAreaHeight(int height); | 113 void SendThemeAreaHeight(int height); |
114 | 114 |
115 // Tells the page whether it is allowed to display Instant results. | 115 // Tells the page whether it is allowed to display Instant results. |
116 void SetDisplayInstantResults(bool display_instant_results); | 116 void SetDisplayInstantResults(bool display_instant_results); |
117 | 117 |
| 118 // Tells the page whether the browser is capturing user key strokes. |
| 119 void KeyCaptureChanged(bool is_key_capture_enabled); |
| 120 |
118 private: | 121 private: |
119 // Overridden from content::WebContentsObserver: | 122 // Overridden from content::WebContentsObserver: |
120 virtual void DidFinishLoad( | 123 virtual void DidFinishLoad( |
121 int64 frame_id, | 124 int64 frame_id, |
122 const GURL& validated_url, | 125 const GURL& validated_url, |
123 bool is_main_frame, | 126 bool is_main_frame, |
124 content::RenderViewHost* render_view_host) OVERRIDE; | 127 content::RenderViewHost* render_view_host) OVERRIDE; |
125 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 128 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
126 | 129 |
127 void SetSuggestions(int page_id, | 130 void SetSuggestions(int page_id, |
128 const std::vector<InstantSuggestion>& suggestions); | 131 const std::vector<InstantSuggestion>& suggestions); |
129 void InstantSupportDetermined(int page_id, bool result); | 132 void InstantSupportDetermined(int page_id, bool result); |
130 void ShowInstantPreview(int page_id, | 133 void ShowInstantPreview(int page_id, |
131 InstantShownReason reason, | 134 InstantShownReason reason, |
132 int height, | 135 int height, |
133 InstantSizeUnits units); | 136 InstantSizeUnits units); |
134 void StartCapturingKeyStrokes(int page_id); | 137 void StartCapturingKeyStrokes(int page_id); |
135 void StopCapturingKeyStrokes(int page_id); | 138 void StopCapturingKeyStrokes(int page_id); |
136 | 139 |
137 Delegate* const delegate_; | 140 Delegate* const delegate_; |
138 | 141 |
139 DISALLOW_COPY_AND_ASSIGN(InstantClient); | 142 DISALLOW_COPY_AND_ASSIGN(InstantClient); |
140 }; | 143 }; |
141 | 144 |
142 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ | 145 #endif // CHROME_BROWSER_INSTANT_INSTANT_CLIENT_H_ |
OLD | NEW |