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 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2498 | 2498 |
2499 RenderWidget::didActivateCompositor(input_handler_identifier); | 2499 RenderWidget::didActivateCompositor(input_handler_identifier); |
2500 | 2500 |
2501 ProcessAcceleratedPinchZoomFlags(*CommandLine::ForCurrentProcess()); | 2501 ProcessAcceleratedPinchZoomFlags(*CommandLine::ForCurrentProcess()); |
2502 } | 2502 } |
2503 | 2503 |
2504 // WebKit::WebFrameClient ----------------------------------------------------- | 2504 // WebKit::WebFrameClient ----------------------------------------------------- |
2505 | 2505 |
2506 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, | 2506 WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, |
2507 const WebPluginParams& params) { | 2507 const WebPluginParams& params) { |
2508 #if defined(ENABLE_PLUGINS) | |
2509 WebPlugin* plugin = NULL; | 2508 WebPlugin* plugin = NULL; |
2510 if (GetContentClient()->renderer()->OverrideCreatePlugin( | 2509 if (GetContentClient()->renderer()->OverrideCreatePlugin( |
2511 this, frame, params, &plugin)) { | 2510 this, frame, params, &plugin)) { |
2512 return plugin; | 2511 return plugin; |
2513 } | 2512 } |
2514 | 2513 |
| 2514 #if defined(ENABLE_PLUGINS) |
2515 if (UTF16ToASCII(params.mimeType) == kBrowserPluginMimeType) { | 2515 if (UTF16ToASCII(params.mimeType) == kBrowserPluginMimeType) { |
2516 return browser_plugin_manager()->CreateBrowserPlugin(this, frame, params); | 2516 return browser_plugin_manager()->CreateBrowserPlugin(this, frame, params); |
2517 } | 2517 } |
2518 | 2518 |
2519 webkit::WebPluginInfo info; | 2519 webkit::WebPluginInfo info; |
2520 std::string mime_type; | 2520 std::string mime_type; |
2521 bool found = GetPluginInfo(params.url, frame->top()->document().url(), | 2521 bool found = GetPluginInfo(params.url, frame->top()->document().url(), |
2522 params.mimeType.utf8(), &info, &mime_type); | 2522 params.mimeType.utf8(), &info, &mime_type); |
2523 if (!found) | 2523 if (!found) |
2524 return NULL; | 2524 return NULL; |
(...skipping 3980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6505 } | 6505 } |
6506 #endif | 6506 #endif |
6507 | 6507 |
6508 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6508 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6509 TransportDIB::Handle dib_handle) { | 6509 TransportDIB::Handle dib_handle) { |
6510 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6510 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6511 RenderProcess::current()->ReleaseTransportDIB(dib); | 6511 RenderProcess::current()->ReleaseTransportDIB(dib); |
6512 } | 6512 } |
6513 | 6513 |
6514 } // namespace content | 6514 } // namespace content |
OLD | NEW |