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 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 const WebKit::WebTouchEvent& touch_event) { | 1238 const WebKit::WebTouchEvent& touch_event) { |
1239 touch_event_queue_->QueueEvent(touch_event); | 1239 touch_event_queue_->QueueEvent(touch_event); |
1240 } | 1240 } |
1241 | 1241 |
1242 void RenderWidgetHostImpl::AddKeyboardListener(KeyboardListener* listener) { | 1242 void RenderWidgetHostImpl::AddKeyboardListener(KeyboardListener* listener) { |
1243 keyboard_listeners_.push_back(listener); | 1243 keyboard_listeners_.push_back(listener); |
1244 } | 1244 } |
1245 | 1245 |
1246 void RenderWidgetHostImpl::RemoveKeyboardListener( | 1246 void RenderWidgetHostImpl::RemoveKeyboardListener( |
1247 KeyboardListener* listener) { | 1247 KeyboardListener* listener) { |
| 1248 // Ensure that the element is actually in the list. |
| 1249 DCHECK(std::find(keyboard_listeners_.begin(), keyboard_listeners_.end(), |
| 1250 listener) != keyboard_listeners_.end()); |
1248 keyboard_listeners_.remove(listener); | 1251 keyboard_listeners_.remove(listener); |
1249 } | 1252 } |
1250 | 1253 |
1251 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { | 1254 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { |
1252 WebKit::WebScreenInfo screen_info; | 1255 WebKit::WebScreenInfo screen_info; |
1253 GetWebScreenInfo(&screen_info); | 1256 GetWebScreenInfo(&screen_info); |
1254 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info)); | 1257 Send(new ViewMsg_ScreenInfoChanged(GetRoutingID(), screen_info)); |
1255 } | 1258 } |
1256 | 1259 |
1257 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, | 1260 void RenderWidgetHostImpl::UpdateVSyncParameters(base::TimeTicks timebase, |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2428 return; | 2431 return; |
2429 | 2432 |
2430 OnRenderAutoResized(new_size); | 2433 OnRenderAutoResized(new_size); |
2431 } | 2434 } |
2432 | 2435 |
2433 void RenderWidgetHostImpl::DetachDelegate() { | 2436 void RenderWidgetHostImpl::DetachDelegate() { |
2434 delegate_ = NULL; | 2437 delegate_ = NULL; |
2435 } | 2438 } |
2436 | 2439 |
2437 } // namespace content | 2440 } // namespace content |
OLD | NEW |