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 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2555 DCHECK(!frame_ || frame_ == frame); | 2555 DCHECK(!frame_ || frame_ == frame); |
2556 // TODO(nasko): Move implementation here. Needed methods: | 2556 // TODO(nasko): Move implementation here. Needed methods: |
2557 // * StartNavStateSyncTimerIfNecessary | 2557 // * StartNavStateSyncTimerIfNecessary |
2558 render_view_->didUpdateCurrentHistoryItem(frame); | 2558 render_view_->didUpdateCurrentHistoryItem(frame); |
2559 } | 2559 } |
2560 | 2560 |
2561 // TODO(zhenw): This will be removed once the blink side implementation is done. | 2561 // TODO(zhenw): This will be removed once the blink side implementation is done. |
2562 void RenderFrameImpl::addNavigationTransitionData( | 2562 void RenderFrameImpl::addNavigationTransitionData( |
2563 const blink::WebString& allowed_destination_host_pattern, | 2563 const blink::WebString& allowed_destination_host_pattern, |
2564 const blink::WebString& selector, | 2564 const blink::WebString& selector, |
2565 const blink::WebString& markup) { | |
2566 FrameHostMsg_AddNavigationTransitionData_Params params; | |
2567 params.render_frame_id = routing_id_; | |
2568 params.allowed_destination_host_pattern = | |
2569 allowed_destination_host_pattern.utf8(); | |
2570 params.selector = selector.utf8(); | |
2571 params.markup = markup.utf8(); | |
2572 | |
2573 Send(new FrameHostMsg_AddNavigationTransitionData(params)); | |
2574 } | |
2575 | |
2576 void RenderFrameImpl::addNavigationTransitionData( | |
2577 const blink::WebString& allowed_destination_host_pattern, | |
2578 const blink::WebString& selector, | |
2579 const blink::WebString& markup, | 2565 const blink::WebString& markup, |
2580 const blink::WebVector<blink::WebString>& web_names, | 2566 const blink::WebVector<blink::WebString>& web_ids, |
2581 const blink::WebVector<blink::WebRect>& web_rects) { | 2567 const blink::WebVector<blink::WebRect>& web_rects) { |
2582 FrameHostMsg_AddNavigationTransitionData_Params params; | 2568 FrameHostMsg_AddNavigationTransitionData_Params params; |
2583 params.render_frame_id = routing_id_; | 2569 params.render_frame_id = routing_id_; |
2584 params.allowed_destination_host_pattern = | 2570 params.allowed_destination_host_pattern = |
2585 allowed_destination_host_pattern.utf8(); | 2571 allowed_destination_host_pattern.utf8(); |
2586 params.selector = selector.utf8(); | 2572 params.selector = selector.utf8(); |
2587 params.markup = markup.utf8(); | 2573 params.markup = markup.utf8(); |
2588 params.elements.resize(web_names.size()); | 2574 params.elements.resize(web_ids.size()); |
2589 for (size_t i = 0; i < web_names.size(); i++) { | 2575 for (size_t i = 0; i < web_ids.size(); i++) { |
2590 params.elements[i].name = web_names[i].utf8(); | 2576 params.elements[i].id = web_ids[i].utf8(); |
2591 params.elements[i].rect = gfx::Rect(web_rects[i]); | 2577 params.elements[i].rect = gfx::Rect(web_rects[i]); |
2592 } | 2578 } |
2593 | 2579 |
2594 Send(new FrameHostMsg_AddNavigationTransitionData(params)); | 2580 Send(new FrameHostMsg_AddNavigationTransitionData(params)); |
| 2581 } |
| 2582 |
| 2583 void RenderFrameImpl::addNavigationTransitionData( |
| 2584 const blink::WebTransitionElementData& data) { |
| 2585 FrameHostMsg_AddNavigationTransitionData_Params params; |
| 2586 params.render_frame_id = routing_id_; |
| 2587 params.allowed_destination_host_pattern = |
| 2588 data.scope.utf8(); |
| 2589 params.selector = data.selector.utf8(); |
| 2590 params.markup = data.markup.utf8(); |
| 2591 params.elements.resize(data.elements.size()); |
| 2592 for (size_t i = 0; i < data.elements.size(); i++) { |
| 2593 params.elements[i].id = data.elements[i].id.utf8(); |
| 2594 params.elements[i].rect = gfx::Rect(data.elements[i].rect); |
| 2595 } |
| 2596 |
| 2597 Send(new FrameHostMsg_AddNavigationTransitionData(params)); |
2595 } | 2598 } |
2596 | 2599 |
2597 void RenderFrameImpl::didChangeThemeColor() { | 2600 void RenderFrameImpl::didChangeThemeColor() { |
2598 if (frame_->parent()) | 2601 if (frame_->parent()) |
2599 return; | 2602 return; |
2600 | 2603 |
2601 Send(new FrameHostMsg_DidChangeThemeColor( | 2604 Send(new FrameHostMsg_DidChangeThemeColor( |
2602 routing_id_, frame_->document().themeColor())); | 2605 routing_id_, frame_->document().themeColor())); |
2603 } | 2606 } |
2604 | 2607 |
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4191 | 4194 |
4192 #if defined(ENABLE_BROWSER_CDMS) | 4195 #if defined(ENABLE_BROWSER_CDMS) |
4193 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4196 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
4194 if (!cdm_manager_) | 4197 if (!cdm_manager_) |
4195 cdm_manager_ = new RendererCdmManager(this); | 4198 cdm_manager_ = new RendererCdmManager(this); |
4196 return cdm_manager_; | 4199 return cdm_manager_; |
4197 } | 4200 } |
4198 #endif // defined(ENABLE_BROWSER_CDMS) | 4201 #endif // defined(ENABLE_BROWSER_CDMS) |
4199 | 4202 |
4200 } // namespace content | 4203 } // namespace content |
OLD | NEW |