| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 // seems safest to not execute the rest. | 2072 // seems safest to not execute the rest. |
| 2073 if (!frame->executeCommand(WebString::fromUTF8(it->name), | 2073 if (!frame->executeCommand(WebString::fromUTF8(it->name), |
| 2074 WebString::fromUTF8(it->value))) | 2074 WebString::fromUTF8(it->value))) |
| 2075 break; | 2075 break; |
| 2076 did_execute_command = true; | 2076 did_execute_command = true; |
| 2077 } | 2077 } |
| 2078 | 2078 |
| 2079 return did_execute_command; | 2079 return did_execute_command; |
| 2080 } | 2080 } |
| 2081 | 2081 |
| 2082 void RenderViewImpl::didHandleGestureEvent(const WebGestureEvent& event, | |
| 2083 bool event_swallowed) { | |
| 2084 #if defined(OS_ANDROID) | |
| 2085 if (event.type == WebInputEvent::GestureTap || | |
| 2086 event.type == WebInputEvent::GestureLongPress) { | |
| 2087 UpdateTextInputState(SHOW_IME_IF_NEEDED); | |
| 2088 } | |
| 2089 #endif | |
| 2090 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | |
| 2091 DidHandleGestureEvent(event)); | |
| 2092 } | |
| 2093 | |
| 2094 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( | 2082 WebKit::WebColorChooser* RenderViewImpl::createColorChooser( |
| 2095 WebKit::WebColorChooserClient* client, | 2083 WebKit::WebColorChooserClient* client, |
| 2096 const WebKit::WebColor& initial_color) { | 2084 const WebKit::WebColor& initial_color) { |
| 2097 RendererWebColorChooserImpl* color_chooser = | 2085 RendererWebColorChooserImpl* color_chooser = |
| 2098 new RendererWebColorChooserImpl(this, client); | 2086 new RendererWebColorChooserImpl(this, client); |
| 2099 color_chooser->Open(static_cast<SkColor>(initial_color)); | 2087 color_chooser->Open(static_cast<SkColor>(initial_color)); |
| 2100 return color_chooser; | 2088 return color_chooser; |
| 2101 } | 2089 } |
| 2102 | 2090 |
| 2103 bool RenderViewImpl::runFileChooser( | 2091 bool RenderViewImpl::runFileChooser( |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2495 RenderThreadImpl::current()->compositor_thread(); | 2483 RenderThreadImpl::current()->compositor_thread(); |
| 2496 if (compositor_thread) | 2484 if (compositor_thread) |
| 2497 compositor_thread->AddInputHandler( | 2485 compositor_thread->AddInputHandler( |
| 2498 routing_id_, input_handler_identifier, AsWeakPtr()); | 2486 routing_id_, input_handler_identifier, AsWeakPtr()); |
| 2499 | 2487 |
| 2500 RenderWidget::didActivateCompositor(input_handler_identifier); | 2488 RenderWidget::didActivateCompositor(input_handler_identifier); |
| 2501 | 2489 |
| 2502 ProcessAcceleratedPinchZoomFlags(*CommandLine::ForCurrentProcess()); | 2490 ProcessAcceleratedPinchZoomFlags(*CommandLine::ForCurrentProcess()); |
| 2503 } | 2491 } |
| 2504 | 2492 |
| 2493 void RenderViewImpl::didHandleGestureEvent( |
| 2494 const WebGestureEvent& event, |
| 2495 EventStatus event_status) { |
| 2496 RenderWidget::didHandleGestureEvent(event, event_status); |
| 2497 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
| 2498 DidHandleGestureEvent(event)); |
| 2499 } |
| 2500 |
| 2505 // WebKit::WebFrameClient ----------------------------------------------------- | 2501 // WebKit::WebFrameClient ----------------------------------------------------- |
| 2506 | 2502 |
| 2507 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, | 2503 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
| 2508 const WebPluginParams& params) { | 2504 const WebPluginParams& params) { |
| 2509 WebPlugin* plugin = NULL; | 2505 WebPlugin* plugin = NULL; |
| 2510 if (GetContentClient()->renderer()->OverrideCreatePlugin( | 2506 if (GetContentClient()->renderer()->OverrideCreatePlugin( |
| 2511 this, frame, params, &plugin)) { | 2507 this, frame, params, &plugin)) { |
| 2512 return plugin; | 2508 return plugin; |
| 2513 } | 2509 } |
| 2514 | 2510 |
| (...skipping 3991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6506 } | 6502 } |
| 6507 #endif | 6503 #endif |
| 6508 | 6504 |
| 6509 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6505 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6510 TransportDIB::Handle dib_handle) { | 6506 TransportDIB::Handle dib_handle) { |
| 6511 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6507 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6512 RenderProcess::current()->ReleaseTransportDIB(dib); | 6508 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6513 } | 6509 } |
| 6514 | 6510 |
| 6515 } // namespace content | 6511 } // namespace content |
| OLD | NEW |