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

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: 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
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()));
nasko 2014/08/04 13:36:48 Why not use c_str()? data() doesn't guarantee null
oystein (OOO til 10th of July) 2014/08/05 19:02:49 Hm I don't see how WebData can expect that, when i
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& origin,
2250 const blink::WebString& selector,
2251 const blink::WebString& markup) {
2252 Send(new FrameHostMsg_AddNavigationTransitionData(
2253 routing_id_, origin.utf8(), selector.utf8(), markup.utf8()));
2254 }
2255
2236 void RenderFrameImpl::didChangeThemeColor() { 2256 void RenderFrameImpl::didChangeThemeColor() {
2237 if (frame_->parent()) 2257 if (frame_->parent())
2238 return; 2258 return;
2239 2259
2240 Send(new FrameHostMsg_DidChangeThemeColor( 2260 Send(new FrameHostMsg_DidChangeThemeColor(
2241 routing_id_, frame_->document().themeColor())); 2261 routing_id_, frame_->document().themeColor()));
2242 } 2262 }
2243 2263
2244 void RenderFrameImpl::requestNotificationPermission( 2264 void RenderFrameImpl::requestNotificationPermission(
2245 const blink::WebSecurityOrigin& origin, 2265 const blink::WebSecurityOrigin& origin,
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3634 3654
3635 #if defined(ENABLE_BROWSER_CDMS) 3655 #if defined(ENABLE_BROWSER_CDMS)
3636 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3656 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3637 if (!cdm_manager_) 3657 if (!cdm_manager_)
3638 cdm_manager_ = new RendererCdmManager(this); 3658 cdm_manager_ = new RendererCdmManager(this);
3639 return cdm_manager_; 3659 return cdm_manager_;
3640 } 3660 }
3641 #endif // defined(ENABLE_BROWSER_CDMS) 3661 #endif // defined(ENABLE_BROWSER_CDMS)
3642 3662
3643 } // namespace content 3663 } // namespace content
OLDNEW
« content/common/frame_messages.h ('K') | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698