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