OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 const WebKit::WebTouchEvent& touch_event) { | 1207 const WebKit::WebTouchEvent& touch_event) { |
1208 touch_event_queue_->QueueEvent(touch_event); | 1208 touch_event_queue_->QueueEvent(touch_event); |
1209 } | 1209 } |
1210 | 1210 |
1211 void RenderWidgetHostImpl::AddKeyboardListener(KeyboardListener* listener) { | 1211 void RenderWidgetHostImpl::AddKeyboardListener(KeyboardListener* listener) { |
1212 keyboard_listeners_.push_back(listener); | 1212 keyboard_listeners_.push_back(listener); |
1213 } | 1213 } |
1214 | 1214 |
1215 void RenderWidgetHostImpl::RemoveKeyboardListener( | 1215 void RenderWidgetHostImpl::RemoveKeyboardListener( |
1216 KeyboardListener* listener) { | 1216 KeyboardListener* listener) { |
| 1217 // Ensure that the element is actually in the list. |
| 1218 DCHECK(std::find(keyboard_listeners_.begin(), keyboard_listeners_.end(), |
| 1219 listener) != keyboard_listeners_.end()); |
1217 keyboard_listeners_.remove(listener); | 1220 keyboard_listeners_.remove(listener); |
1218 } | 1221 } |
1219 | 1222 |
1220 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { | 1223 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { |
1221 WebKit::WebScreenInfo screen_info; | 1224 WebKit::WebScreenInfo screen_info; |
1222 GetWebScreenInfo(&screen_info); | 1225 GetWebScreenInfo(&screen_info); |
1223 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info)); | 1226 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info)); |
1224 } | 1227 } |
1225 | 1228 |
1226 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, | 1229 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2393 return; | 2396 return; |
2394 | 2397 |
2395 OnRenderAutoResized(new_size); | 2398 OnRenderAutoResized(new_size); |
2396 } | 2399 } |
2397 | 2400 |
2398 void RenderWidgetHostImpl::DetachDelegate() { | 2401 void RenderWidgetHostImpl::DetachDelegate() { |
2399 delegate_ = NULL; | 2402 delegate_ = NULL; |
2400 } | 2403 } |
2401 | 2404 |
2402 } // namespace content | 2405 } // namespace content |
OLD | NEW |