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/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 MEDIA_DEVICE_INVALID_STATE, | 1090 MEDIA_DEVICE_INVALID_STATE, |
1091 scoped_ptr<MediaStreamUI>()); | 1091 scoped_ptr<MediaStreamUI>()); |
1092 return; | 1092 return; |
1093 } | 1093 } |
1094 | 1094 |
1095 delegate_->RequestMediaAccessPermission(request, callback); | 1095 delegate_->RequestMediaAccessPermission(request, callback); |
1096 } | 1096 } |
1097 | 1097 |
1098 bool BrowserPluginGuest::PreHandleGestureEvent( | 1098 bool BrowserPluginGuest::PreHandleGestureEvent( |
1099 WebContents* source, const blink::WebGestureEvent& event) { | 1099 WebContents* source, const blink::WebGestureEvent& event) { |
1100 return event.type == blink::WebGestureEvent::GesturePinchBegin || | 1100 if (!delegate_) |
1101 event.type == blink::WebGestureEvent::GesturePinchUpdate || | 1101 return false; |
1102 event.type == blink::WebGestureEvent::GesturePinchEnd; | 1102 |
| 1103 return delegate_->PreHandleGestureEvent(source, event); |
1103 } | 1104 } |
1104 | 1105 |
1105 void BrowserPluginGuest::OnUpdateRect( | 1106 void BrowserPluginGuest::OnUpdateRect( |
1106 const ViewHostMsg_UpdateRect_Params& params) { | 1107 const ViewHostMsg_UpdateRect_Params& params) { |
1107 BrowserPluginMsg_UpdateRect_Params relay_params; | 1108 BrowserPluginMsg_UpdateRect_Params relay_params; |
1108 relay_params.view_size = params.view_size; | 1109 relay_params.view_size = params.view_size; |
1109 relay_params.scale_factor = params.scale_factor; | 1110 relay_params.scale_factor = params.scale_factor; |
1110 relay_params.is_resize_ack = ViewHostMsg_UpdateRect_Flags::is_resize_ack( | 1111 relay_params.is_resize_ack = ViewHostMsg_UpdateRect_Flags::is_resize_ack( |
1111 params.flags); | 1112 params.flags); |
1112 | 1113 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 1147 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
1147 const gfx::Range& range, | 1148 const gfx::Range& range, |
1148 const std::vector<gfx::Rect>& character_bounds) { | 1149 const std::vector<gfx::Rect>& character_bounds) { |
1149 static_cast<RenderWidgetHostViewBase*>( | 1150 static_cast<RenderWidgetHostViewBase*>( |
1150 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 1151 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
1151 range, character_bounds); | 1152 range, character_bounds); |
1152 } | 1153 } |
1153 #endif | 1154 #endif |
1154 | 1155 |
1155 } // namespace content | 1156 } // namespace content |
OLD | NEW |