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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 if (webview() && webview()->mainFrame()) | 1546 if (webview() && webview()->mainFrame()) |
1547 active_url = GURL(webview()->mainFrame()->document().url()); | 1547 active_url = GURL(webview()->mainFrame()->document().url()); |
1548 RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( | 1548 RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( |
1549 routing_id_, plugin, active_url); | 1549 routing_id_, plugin, active_url); |
1550 widget->show(WebKit::WebNavigationPolicyIgnore); | 1550 widget->show(WebKit::WebNavigationPolicyIgnore); |
1551 return widget; | 1551 return widget; |
1552 } | 1552 } |
1553 | 1553 |
1554 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace( | 1554 WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace( |
1555 unsigned quota) { | 1555 unsigned quota) { |
| 1556 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND |
| 1557 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
| 1558 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION, |
| 1559 session_storage_namespace_id_); |
| 1560 #else |
1556 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | 1561 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) |
1557 return WebStorageNamespace::createSessionStorageNamespace(quota); | 1562 return WebStorageNamespace::createSessionStorageNamespace(quota); |
1558 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); | 1563 CHECK(session_storage_namespace_id_ != kInvalidSessionStorageNamespaceId); |
1559 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION, | 1564 return new RendererWebStorageNamespaceImpl(DOM_STORAGE_SESSION, |
1560 session_storage_namespace_id_); | 1565 session_storage_namespace_id_); |
| 1566 #endif |
1561 } | 1567 } |
1562 | 1568 |
1563 WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D( | 1569 WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D( |
1564 const WebGraphicsContext3D::Attributes& attributes) { | 1570 const WebGraphicsContext3D::Attributes& attributes) { |
1565 if (!webview()) | 1571 if (!webview()) |
1566 return NULL; | 1572 return NULL; |
1567 // The WebGraphicsContext3DInProcessImpl code path is used for | 1573 // The WebGraphicsContext3DInProcessImpl code path is used for |
1568 // layout tests (though not through this code) as well as for | 1574 // layout tests (though not through this code) as well as for |
1569 // debugging and bringing up new ports. | 1575 // debugging and bringing up new ports. |
1570 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { | 1576 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { |
(...skipping 3625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5196 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5202 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5197 return !!RenderThreadImpl::current()->compositor_thread(); | 5203 return !!RenderThreadImpl::current()->compositor_thread(); |
5198 } | 5204 } |
5199 | 5205 |
5200 void RenderViewImpl::OnJavaBridgeInit() { | 5206 void RenderViewImpl::OnJavaBridgeInit() { |
5201 DCHECK(!java_bridge_dispatcher_.get()); | 5207 DCHECK(!java_bridge_dispatcher_.get()); |
5202 #if defined(ENABLE_JAVA_BRIDGE) | 5208 #if defined(ENABLE_JAVA_BRIDGE) |
5203 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5209 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5204 #endif | 5210 #endif |
5205 } | 5211 } |
OLD | NEW |