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 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2427 didCommitProvisionalLoad(frame, item, commit_type); | 2427 didCommitProvisionalLoad(frame, item, commit_type); |
2428 } | 2428 } |
2429 | 2429 |
2430 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) { | 2430 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) { |
2431 DCHECK(!frame_ || frame_ == frame); | 2431 DCHECK(!frame_ || frame_ == frame); |
2432 // TODO(nasko): Move implementation here. Needed methods: | 2432 // TODO(nasko): Move implementation here. Needed methods: |
2433 // * StartNavStateSyncTimerIfNecessary | 2433 // * StartNavStateSyncTimerIfNecessary |
2434 render_view_->didUpdateCurrentHistoryItem(frame); | 2434 render_view_->didUpdateCurrentHistoryItem(frame); |
2435 } | 2435 } |
2436 | 2436 |
2437 // TODO(zhenw): This will be removed once the blink side implementation is done. | |
2438 void RenderFrameImpl::addNavigationTransitionData( | |
2439 const blink::WebString& allowed_destination_host_pattern, | |
2440 const blink::WebString& selector, | |
2441 const blink::WebString& markup) { | |
2442 FrameHostMsg_AddNavigationTransitionData_Params params; | |
2443 params.render_frame_id = routing_id_; | |
2444 params.allowed_destination_host_pattern = | |
2445 allowed_destination_host_pattern.utf8(); | |
2446 params.selector = selector.utf8(); | |
2447 params.markup = markup.utf8(); | |
2448 | |
2449 Send(new FrameHostMsg_AddNavigationTransitionData(params)); | |
nasko
2014/10/17 20:04:19
There shouldn't be two methods that send IPCs, jus
Zhen Wang
2014/10/17 21:34:29
Are we ok to use default params? I heard somewhere
nasko
2014/10/20 14:14:18
The pattern is to have one method that sends the I
| |
2450 } | |
2451 | |
2437 void RenderFrameImpl::addNavigationTransitionData( | 2452 void RenderFrameImpl::addNavigationTransitionData( |
2438 const blink::WebString& allowed_destination_host_pattern, | 2453 const blink::WebString& allowed_destination_host_pattern, |
2439 const blink::WebString& selector, | 2454 const blink::WebString& selector, |
2440 const blink::WebString& markup) { | 2455 const blink::WebString& markup, |
2441 Send(new FrameHostMsg_AddNavigationTransitionData( | 2456 const blink::WebVector<blink::WebString>& web_names, |
2442 routing_id_, allowed_destination_host_pattern.utf8(), selector.utf8(), | 2457 const blink::WebVector<blink::WebRect>& web_rects) { |
2443 markup.utf8())); | 2458 FrameHostMsg_AddNavigationTransitionData_Params params; |
2459 params.render_frame_id = routing_id_; | |
2460 params.allowed_destination_host_pattern = | |
2461 allowed_destination_host_pattern.utf8(); | |
2462 params.selector = selector.utf8(); | |
2463 params.markup = markup.utf8(); | |
2464 for (size_t i = 0; i < web_names.size(); i++) { | |
2465 params.names.push_back(web_names[i].utf8()); | |
2466 } | |
2467 for (size_t i = 0; i < web_rects.size(); i++) { | |
2468 params.rects.push_back(gfx::Rect(web_rects[i])); | |
2469 } | |
2470 | |
2471 Send(new FrameHostMsg_AddNavigationTransitionData(params)); | |
2444 } | 2472 } |
2445 | 2473 |
2446 void RenderFrameImpl::didChangeThemeColor() { | 2474 void RenderFrameImpl::didChangeThemeColor() { |
2447 if (frame_->parent()) | 2475 if (frame_->parent()) |
2448 return; | 2476 return; |
2449 | 2477 |
2450 Send(new FrameHostMsg_DidChangeThemeColor( | 2478 Send(new FrameHostMsg_DidChangeThemeColor( |
2451 routing_id_, frame_->document().themeColor())); | 2479 routing_id_, frame_->document().themeColor())); |
2452 } | 2480 } |
2453 | 2481 |
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3974 | 4002 |
3975 #if defined(ENABLE_BROWSER_CDMS) | 4003 #if defined(ENABLE_BROWSER_CDMS) |
3976 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4004 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3977 if (!cdm_manager_) | 4005 if (!cdm_manager_) |
3978 cdm_manager_ = new RendererCdmManager(this); | 4006 cdm_manager_ = new RendererCdmManager(this); |
3979 return cdm_manager_; | 4007 return cdm_manager_; |
3980 } | 4008 } |
3981 #endif // defined(ENABLE_BROWSER_CDMS) | 4009 #endif // defined(ENABLE_BROWSER_CDMS) |
3982 | 4010 |
3983 } // namespace content | 4011 } // namespace content |
OLD | NEW |