OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1938 // navigation without valid HistoryItem state, WebCore will think it is a | 1938 // navigation without valid HistoryItem state, WebCore will think it is a |
1939 // new navigation. | 1939 // new navigation. |
1940 navigation_state->set_request_committed(true); | 1940 navigation_state->set_request_committed(true); |
1941 | 1941 |
1942 UpdateURL(frame); | 1942 UpdateURL(frame); |
1943 | 1943 |
1944 // Check whether we have new encoding name. | 1944 // Check whether we have new encoding name. |
1945 render_view_->UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); | 1945 render_view_->UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); |
1946 } | 1946 } |
1947 | 1947 |
1948 void RenderFrameImpl::didClearWindowObject(blink::WebLocalFrame* frame, | 1948 void RenderFrameImpl::didClearWindowObject(blink::WebLocalFrame* frame) { |
1949 int world_id) { | |
1950 DCHECK(!frame_ || frame_ == frame); | 1949 DCHECK(!frame_ || frame_ == frame); |
1951 // TODO(nasko): Move implementation here. Needed state: | 1950 // TODO(nasko): Move implementation here. Needed state: |
1952 // * enabled_bindings_ | 1951 // * enabled_bindings_ |
1953 // * dom_automation_controller_ | 1952 // * dom_automation_controller_ |
1954 // * stats_collection_controller_ | 1953 // * stats_collection_controller_ |
1955 | 1954 |
1956 render_view_->didClearWindowObject(frame, world_id); | 1955 render_view_->didClearWindowObject(frame); |
1957 | |
1958 // Only install controllers into the main world. | |
1959 if (world_id) | |
1960 return; | |
1961 | 1956 |
1962 if (render_view_->GetEnabledBindings() & BINDINGS_POLICY_DOM_AUTOMATION) | 1957 if (render_view_->GetEnabledBindings() & BINDINGS_POLICY_DOM_AUTOMATION) |
1963 DomAutomationController::Install(this, frame); | 1958 DomAutomationController::Install(this, frame); |
1964 | 1959 |
1965 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, | 1960 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, DidClearWindowObject()); |
1966 DidClearWindowObject(world_id)); | |
1967 } | 1961 } |
1968 | 1962 |
1969 void RenderFrameImpl::didCreateDocumentElement(blink::WebLocalFrame* frame) { | 1963 void RenderFrameImpl::didCreateDocumentElement(blink::WebLocalFrame* frame) { |
1970 DCHECK(!frame_ || frame_ == frame); | 1964 DCHECK(!frame_ || frame_ == frame); |
1971 | 1965 |
1972 // Notify the browser about non-blank documents loading in the top frame. | 1966 // Notify the browser about non-blank documents loading in the top frame. |
1973 GURL url = frame->document().url(); | 1967 GURL url = frame->document().url(); |
1974 if (url.is_valid() && url.spec() != kAboutBlankURL) { | 1968 if (url.is_valid() && url.spec() != kAboutBlankURL) { |
1975 // TODO(nasko): Check if webview()->mainFrame() is the same as the | 1969 // TODO(nasko): Check if webview()->mainFrame() is the same as the |
1976 // frame->tree()->top(). | 1970 // frame->tree()->top(). |
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3393 weak_factory_.GetWeakPtr(), | 3387 weak_factory_.GetWeakPtr(), |
3394 render_view_->media_player_manager_, | 3388 render_view_->media_player_manager_, |
3395 stream_texture_factory, | 3389 stream_texture_factory, |
3396 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), | 3390 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), |
3397 new RenderMediaLog()); | 3391 new RenderMediaLog()); |
3398 } | 3392 } |
3399 | 3393 |
3400 #endif | 3394 #endif |
3401 | 3395 |
3402 } // namespace content | 3396 } // namespace content |
OLD | NEW |