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 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2023 } | 2023 } |
2024 | 2024 |
2025 void RenderFrameImpl::didCreateDocumentElement(blink::WebLocalFrame* frame) { | 2025 void RenderFrameImpl::didCreateDocumentElement(blink::WebLocalFrame* frame) { |
2026 DCHECK(!frame_ || frame_ == frame); | 2026 DCHECK(!frame_ || frame_ == frame); |
2027 | 2027 |
2028 // Notify the browser about non-blank documents loading in the top frame. | 2028 // Notify the browser about non-blank documents loading in the top frame. |
2029 GURL url = frame->document().url(); | 2029 GURL url = frame->document().url(); |
2030 if (url.is_valid() && url.spec() != kAboutBlankURL) { | 2030 if (url.is_valid() && url.spec() != kAboutBlankURL) { |
2031 // TODO(nasko): Check if webview()->mainFrame() is the same as the | 2031 // TODO(nasko): Check if webview()->mainFrame() is the same as the |
2032 // frame->tree()->top(). | 2032 // frame->tree()->top(). |
2033 if (frame == render_view_->webview()->mainFrame()) { | 2033 blink::WebFrame* main_frame = render_view_->webview()->mainFrame(); |
| 2034 if (frame == main_frame) { |
2034 render_view_->Send(new ViewHostMsg_DocumentAvailableInMainFrame( | 2035 render_view_->Send(new ViewHostMsg_DocumentAvailableInMainFrame( |
2035 render_view_->GetRoutingID())); | 2036 render_view_->GetRoutingID(), |
| 2037 main_frame->document().isPluginDocument())); |
2036 } | 2038 } |
2037 } | 2039 } |
2038 | 2040 |
2039 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), | 2041 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), |
2040 DidCreateDocumentElement(frame)); | 2042 DidCreateDocumentElement(frame)); |
2041 } | 2043 } |
2042 | 2044 |
2043 void RenderFrameImpl::didReceiveTitle(blink::WebLocalFrame* frame, | 2045 void RenderFrameImpl::didReceiveTitle(blink::WebLocalFrame* frame, |
2044 const blink::WebString& title, | 2046 const blink::WebString& title, |
2045 blink::WebTextDirection direction) { | 2047 blink::WebTextDirection direction) { |
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3490 weak_factory_.GetWeakPtr(), | 3492 weak_factory_.GetWeakPtr(), |
3491 render_view_->media_player_manager_, | 3493 render_view_->media_player_manager_, |
3492 stream_texture_factory, | 3494 stream_texture_factory, |
3493 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), | 3495 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), |
3494 new RenderMediaLog()); | 3496 new RenderMediaLog()); |
3495 } | 3497 } |
3496 | 3498 |
3497 #endif | 3499 #endif |
3498 | 3500 |
3499 } // namespace content | 3501 } // namespace content |
OLD | NEW |