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 std::vector<std::string> data; | |
2443 data.push_back(allowed_destination_host_pattern.utf8()); | |
nasko
2014/10/14 23:09:51
Do not collapse top-level parameters into a vector
Zhen Wang
2014/10/15 18:22:12
Done.
| |
2444 data.push_back(selector.utf8()); | |
2445 data.push_back(markup.utf8()); | |
2446 | |
2447 Send(new FrameHostMsg_AddNavigationTransitionData( | |
2448 routing_id_, data, std::vector<std::string>(), | |
2449 std::vector<gfx::Rect>())); | |
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, |
2456 const blink::WebVector<blink::WebString>& web_names, | |
2457 const blink::WebVector<blink::WebRect>& web_rects) { | |
2458 std::vector<std::string> data; | |
2459 data.push_back(allowed_destination_host_pattern.utf8()); | |
2460 data.push_back(selector.utf8()); | |
2461 data.push_back(markup.utf8()); | |
2462 | |
2463 std::vector<std::string> names; | |
2464 for (size_t i = 0; i < web_names.size(); i++) { | |
2465 names.push_back(web_names[i].utf8()); | |
2466 } | |
2467 | |
2468 std::vector<gfx::Rect> rects; | |
2469 for (size_t i = 0; i < web_rects.size(); i++) { | |
2470 rects.push_back(gfx::Rect(web_rects[i])); | |
2471 } | |
2472 | |
2441 Send(new FrameHostMsg_AddNavigationTransitionData( | 2473 Send(new FrameHostMsg_AddNavigationTransitionData( |
2442 routing_id_, allowed_destination_host_pattern.utf8(), selector.utf8(), | 2474 routing_id_, data, names, rects)); |
2443 markup.utf8())); | |
2444 } | 2475 } |
2445 | 2476 |
2446 void RenderFrameImpl::didChangeThemeColor() { | 2477 void RenderFrameImpl::didChangeThemeColor() { |
2447 if (frame_->parent()) | 2478 if (frame_->parent()) |
2448 return; | 2479 return; |
2449 | 2480 |
2450 Send(new FrameHostMsg_DidChangeThemeColor( | 2481 Send(new FrameHostMsg_DidChangeThemeColor( |
2451 routing_id_, frame_->document().themeColor())); | 2482 routing_id_, frame_->document().themeColor())); |
2452 } | 2483 } |
2453 | 2484 |
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3974 | 4005 |
3975 #if defined(ENABLE_BROWSER_CDMS) | 4006 #if defined(ENABLE_BROWSER_CDMS) |
3976 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4007 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
3977 if (!cdm_manager_) | 4008 if (!cdm_manager_) |
3978 cdm_manager_ = new RendererCdmManager(this); | 4009 cdm_manager_ = new RendererCdmManager(this); |
3979 return cdm_manager_; | 4010 return cdm_manager_; |
3980 } | 4011 } |
3981 #endif // defined(ENABLE_BROWSER_CDMS) | 4012 #endif // defined(ENABLE_BROWSER_CDMS) |
3982 | 4013 |
3983 } // namespace content | 4014 } // namespace content |
OLD | NEW |