Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 435833002: Navigation transitions: Plumb data from the outgoing renderer to the incoming renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Testfix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) 724 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling)
725 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete, 725 IPC_MESSAGE_HANDLER(InputMsg_ExtendSelectionAndDelete,
726 OnExtendSelectionAndDelete) 726 OnExtendSelectionAndDelete)
727 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText, 727 IPC_MESSAGE_HANDLER(InputMsg_SetCompositionFromExistingText,
728 OnSetCompositionFromExistingText) 728 OnSetCompositionFromExistingText)
729 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) 729 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest)
730 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, 730 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest,
731 OnJavaScriptExecuteRequest) 731 OnJavaScriptExecuteRequest)
732 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets, 732 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets,
733 OnSetEditableSelectionOffsets) 733 OnSetEditableSelectionOffsets)
734 IPC_MESSAGE_HANDLER(FrameMsg_SetupTransitionView, OnSetupTransitionView)
735 IPC_MESSAGE_HANDLER(FrameMsg_BeginExitTransition, OnBeginExitTransition)
734 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) 736 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
735 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, 737 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest,
736 OnTextSurroundingSelectionRequest) 738 OnTextSurroundingSelectionRequest)
737 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL, 739 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL,
738 OnAddStyleSheetByURL) 740 OnAddStyleSheetByURL)
739 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, 741 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
740 OnSetAccessibilityMode) 742 OnSetAccessibilityMode)
741 #if defined(OS_MACOSX) 743 #if defined(OS_MACOSX)
742 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) 744 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard)
743 #endif 745 #endif
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 routing_id_, 1240 routing_id_,
1239 surroundingText.textContent(), 1241 surroundingText.textContent(),
1240 surroundingText.startOffsetInTextContent(), 1242 surroundingText.startOffsetInTextContent(),
1241 surroundingText.endOffsetInTextContent())); 1243 surroundingText.endOffsetInTextContent()));
1242 } 1244 }
1243 1245
1244 void RenderFrameImpl::OnAddStyleSheetByURL(const std::string& url) { 1246 void RenderFrameImpl::OnAddStyleSheetByURL(const std::string& url) {
1245 frame_->addStyleSheetByURL(WebString::fromUTF8(url)); 1247 frame_->addStyleSheetByURL(WebString::fromUTF8(url));
1246 } 1248 }
1247 1249
1250 void RenderFrameImpl::OnSetupTransitionView(const std::string& markup) {
1251 frame_->document().setIsTransitionDocument();
1252 frame_->navigateToSandboxedMarkup(WebData(markup.data(), markup.length()));
1253 }
1254
1255 void RenderFrameImpl::OnBeginExitTransition(const std::string& css_selector) {
1256 frame_->document().setIsTransitionDocument();
1257 frame_->document().beginExitTransition(WebString::fromUTF8(css_selector));
1258 }
1259
1248 bool RenderFrameImpl::ShouldUpdateSelectionTextFromContextMenuParams( 1260 bool RenderFrameImpl::ShouldUpdateSelectionTextFromContextMenuParams(
1249 const base::string16& selection_text, 1261 const base::string16& selection_text,
1250 size_t selection_text_offset, 1262 size_t selection_text_offset,
1251 const gfx::Range& selection_range, 1263 const gfx::Range& selection_range,
1252 const ContextMenuParams& params) { 1264 const ContextMenuParams& params) {
1253 base::string16 trimmed_selection_text; 1265 base::string16 trimmed_selection_text;
1254 if (!selection_text.empty() && !selection_range.is_empty()) { 1266 if (!selection_text.empty() && !selection_range.is_empty()) {
1255 const int start = selection_range.GetMin() - selection_text_offset; 1267 const int start = selection_range.GetMin() - selection_text_offset;
1256 const size_t length = selection_range.length(); 1268 const size_t length = selection_range.length();
1257 if (start >= 0 && start + length <= selection_text.length()) { 1269 if (start >= 0 && start + length <= selection_text.length()) {
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 didCommitProvisionalLoad(frame, item, commit_type); 2238 didCommitProvisionalLoad(frame, item, commit_type);
2227 } 2239 }
2228 2240
2229 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) { 2241 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) {
2230 DCHECK(!frame_ || frame_ == frame); 2242 DCHECK(!frame_ || frame_ == frame);
2231 // TODO(nasko): Move implementation here. Needed methods: 2243 // TODO(nasko): Move implementation here. Needed methods:
2232 // * StartNavStateSyncTimerIfNecessary 2244 // * StartNavStateSyncTimerIfNecessary
2233 render_view_->didUpdateCurrentHistoryItem(frame); 2245 render_view_->didUpdateCurrentHistoryItem(frame);
2234 } 2246 }
2235 2247
2248 void RenderFrameImpl::addNavigationTransitionData(
2249 const blink::WebString& allowed_destination_host_pattern,
2250 const blink::WebString& selector,
2251 const blink::WebString& markup) {
2252 Send(new FrameHostMsg_AddNavigationTransitionData(
2253 routing_id_, allowed_destination_host_pattern.utf8(), selector.utf8(),
2254 markup.utf8()));
2255 }
2256
2236 void RenderFrameImpl::didChangeThemeColor() { 2257 void RenderFrameImpl::didChangeThemeColor() {
2237 if (frame_->parent()) 2258 if (frame_->parent())
2238 return; 2259 return;
2239 2260
2240 Send(new FrameHostMsg_DidChangeThemeColor( 2261 Send(new FrameHostMsg_DidChangeThemeColor(
2241 routing_id_, frame_->document().themeColor())); 2262 routing_id_, frame_->document().themeColor()));
2242 } 2263 }
2243 2264
2244 void RenderFrameImpl::requestNotificationPermission( 2265 void RenderFrameImpl::requestNotificationPermission(
2245 const blink::WebSecurityOrigin& origin, 2266 const blink::WebSecurityOrigin& origin,
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
3627 3648
3628 #if defined(ENABLE_BROWSER_CDMS) 3649 #if defined(ENABLE_BROWSER_CDMS)
3629 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3650 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3630 if (!cdm_manager_) 3651 if (!cdm_manager_)
3631 cdm_manager_ = new RendererCdmManager(this); 3652 cdm_manager_ = new RendererCdmManager(this);
3632 return cdm_manager_; 3653 return cdm_manager_;
3633 } 3654 }
3634 #endif // defined(ENABLE_BROWSER_CDMS) 3655 #endif // defined(ENABLE_BROWSER_CDMS)
3635 3656
3636 } // namespace content 3657 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698