| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2993 const char kPepperPrefix[] = "pepper-"; | 2993 const char kPepperPrefix[] = "pepper-"; |
| 2994 if (StartsWithASCII(*mime_type_to_use, kPepperPrefix, true)) { | 2994 if (StartsWithASCII(*mime_type_to_use, kPepperPrefix, true)) { |
| 2995 if (CommandLine::ForCurrentProcess()-> | 2995 if (CommandLine::ForCurrentProcess()-> |
| 2996 HasSwitch(switches::kInternalPepper)) { | 2996 HasSwitch(switches::kInternalPepper)) { |
| 2997 in_process_plugin = true; | 2997 in_process_plugin = true; |
| 2998 use_pepper_host = true; | 2998 use_pepper_host = true; |
| 2999 } else { | 2999 } else { |
| 3000 // In process Pepper plugins must be explicitly enabled. | 3000 // In process Pepper plugins must be explicitly enabled. |
| 3001 return NULL; | 3001 return NULL; |
| 3002 } | 3002 } |
| 3003 } else if (CommandLine::ForCurrentProcess()-> |
| 3004 HasSwitch(switches::kInternalPDF) && |
| 3005 StartsWithASCII(*mime_type_to_use, "application/pdf", true)) { |
| 3006 in_process_plugin = true; |
| 3007 use_pepper_host = true; |
| 3003 } | 3008 } |
| 3004 // Check for Native Client modules. | 3009 // Check for Native Client modules. |
| 3005 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) { | 3010 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInternalNaCl)) { |
| 3006 if (mime_type == "application/x-nacl-srpc") { | 3011 if (mime_type == "application/x-nacl-srpc") { |
| 3007 in_process_plugin = true; | 3012 in_process_plugin = true; |
| 3008 use_pepper_host = true; | 3013 use_pepper_host = true; |
| 3009 } | 3014 } |
| 3010 } | 3015 } |
| 3011 if (in_process_plugin) { | 3016 if (in_process_plugin) { |
| 3012 if (use_pepper_host) { | 3017 if (use_pepper_host) { |
| (...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4803 gfx::PluginWindowHandle window) { | 4808 gfx::PluginWindowHandle window) { |
| 4804 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); | 4809 Send(new ViewHostMsg_AcceleratedSurfaceBuffersSwapped(routing_id(), window)); |
| 4805 } | 4810 } |
| 4806 #endif | 4811 #endif |
| 4807 | 4812 |
| 4808 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { | 4813 WebKit::WebGeolocationServiceInterface* RenderView::getGeolocationService() { |
| 4809 if (!geolocation_dispatcher_.get()) | 4814 if (!geolocation_dispatcher_.get()) |
| 4810 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); | 4815 geolocation_dispatcher_.reset(new GeolocationDispatcher(this)); |
| 4811 return geolocation_dispatcher_.get(); | 4816 return geolocation_dispatcher_.get(); |
| 4812 } | 4817 } |
| OLD | NEW |