| 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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace( | 1540 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace( |
| 1541 unsigned quota) { | 1541 unsigned quota) { |
| 1542 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | 1542 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) |
| 1543 return WebStorageNamespace::createSessionStorageNamespace(quota); | 1543 return WebStorageNamespace::createSessionStorageNamespace(quota); |
| 1544 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); | 1544 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
| 1545 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION, | 1545 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION, |
| 1546 session_storage_namespace_id_); | 1546 session_storage_namespace_id_); |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D( | 1549 WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D( |
| 1550 const WebGraphicsContext3D::Attributes& attributes) { |
| 1551 return createGraphicsContext3D(attributes, true); |
| 1552 } |
| 1553 |
| 1554 WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D( |
| 1550 const WebGraphicsContext3D::Attributes& attributes, | 1555 const WebGraphicsContext3D::Attributes& attributes, |
| 1551 bool direct) { | 1556 bool direct) { |
| 1552 if (!webview()) | 1557 if (!webview()) |
| 1553 return NULL; | 1558 return NULL; |
| 1554 // The WebGraphicsContext3DInProcessImpl code path is used for | 1559 // The WebGraphicsContext3DInProcessImpl code path is used for |
| 1555 // layout tests (though not through this code) as well as for | 1560 // layout tests (though not through this code) as well as for |
| 1556 // debugging and bringing up new ports. | 1561 // debugging and bringing up new ports. |
| 1557 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { | 1562 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { |
| 1558 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( | 1563 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( |
| 1559 attributes, direct); | 1564 attributes, direct); |
| (...skipping 3561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5121 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5126 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5122 return !!RenderThreadImpl::current()->compositor_thread(); | 5127 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5123 } | 5128 } |
| 5124 | 5129 |
| 5125 void RenderViewImpl::OnJavaBridgeInit() { | 5130 void RenderViewImpl::OnJavaBridgeInit() { |
| 5126 DCHECK(!java_bridge_dispatcher_.get()); | 5131 DCHECK(!java_bridge_dispatcher_.get()); |
| 5127 #if defined(ENABLE_JAVA_BRIDGE) | 5132 #if defined(ENABLE_JAVA_BRIDGE) |
| 5128 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5133 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 5129 #endif | 5134 #endif |
| 5130 } | 5135 } |
| OLD | NEW |