| 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 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1466 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace( | 1466 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace( |
| 1467 unsigned quota) { | 1467 unsigned quota) { |
| 1468 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | 1468 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) |
| 1469 return WebStorageNamespace::createSessionStorageNamespace(quota); | 1469 return WebStorageNamespace::createSessionStorageNamespace(quota); |
| 1470 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); | 1470 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
| 1471 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION, | 1471 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION, |
| 1472 session_storage_namespace_id_); | 1472 session_storage_namespace_id_); |
| 1473 } | 1473 } |
| 1474 | 1474 |
| 1475 WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D( | 1475 WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D( |
| 1476 WebGraphicsContext3D::Attributes attributes, | 1476 const WebGraphicsContext3D::Attributes& attributes, |
| 1477 bool direct) { | 1477 bool direct) { |
| 1478 if (!webview()) | 1478 if (!webview()) |
| 1479 return NULL; | 1479 return NULL; |
| 1480 // The WebGraphicsContext3DInProcessImpl code path is used for | 1480 // The WebGraphicsContext3DInProcessImpl code path is used for |
| 1481 // layout tests (though not through this code) as well as for | 1481 // layout tests (though not through this code) as well as for |
| 1482 // debugging and bringing up new ports. | 1482 // debugging and bringing up new ports. |
| 1483 scoped_ptr<WebGraphicsContext3D> context; | 1483 scoped_ptr<WebGraphicsContext3D> context; |
| 1484 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { | 1484 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { |
| 1485 context.reset(new webkit::gpu::WebGraphicsContext3DInProcessImpl( | 1485 context.reset(new webkit::gpu::WebGraphicsContext3DInProcessImpl( |
| 1486 gfx::kNullPluginWindow, NULL)); | 1486 gfx::kNullPluginWindow, NULL)); |
| (...skipping 3461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4948 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4948 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 4949 return !!RenderThreadImpl::current()->compositor_thread(); | 4949 return !!RenderThreadImpl::current()->compositor_thread(); |
| 4950 } | 4950 } |
| 4951 | 4951 |
| 4952 void RenderViewImpl::OnJavaBridgeInit() { | 4952 void RenderViewImpl::OnJavaBridgeInit() { |
| 4953 DCHECK(!java_bridge_dispatcher_.get()); | 4953 DCHECK(!java_bridge_dispatcher_.get()); |
| 4954 #if defined(ENABLE_JAVA_BRIDGE) | 4954 #if defined(ENABLE_JAVA_BRIDGE) |
| 4955 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4955 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 4956 #endif | 4956 #endif |
| 4957 } | 4957 } |
| OLD | NEW |