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

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

Issue 309143002: Navigation transitions: Added "addStyleSheetByURL" function to insert stylesheet links. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review. Created 6 years, 6 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
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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling) 698 IPC_MESSAGE_HANDLER(InputMsg_ReplaceMisspelling, OnReplaceMisspelling)
699 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest) 699 IPC_MESSAGE_HANDLER(FrameMsg_CSSInsertRequest, OnCSSInsertRequest)
700 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest, 700 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequest,
701 OnJavaScriptExecuteRequest) 701 OnJavaScriptExecuteRequest)
702 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets, 702 IPC_MESSAGE_HANDLER(FrameMsg_SetEditableSelectionOffsets,
703 OnSetEditableSelectionOffsets) 703 OnSetEditableSelectionOffsets)
704 IPC_MESSAGE_HANDLER(FrameMsg_SetCompositionFromExistingText, 704 IPC_MESSAGE_HANDLER(FrameMsg_SetCompositionFromExistingText,
705 OnSetCompositionFromExistingText) 705 OnSetCompositionFromExistingText)
706 IPC_MESSAGE_HANDLER(FrameMsg_ExtendSelectionAndDelete, 706 IPC_MESSAGE_HANDLER(FrameMsg_ExtendSelectionAndDelete,
707 OnExtendSelectionAndDelete) 707 OnExtendSelectionAndDelete)
708 IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL,
709 OnAddStyleSheetByURL)
708 #if defined(OS_MACOSX) 710 #if defined(OS_MACOSX)
709 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard) 711 IPC_MESSAGE_HANDLER(InputMsg_CopyToFindPboard, OnCopyToFindPboard)
710 #endif 712 #endif
711 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) 713 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
712 IPC_END_MESSAGE_MAP() 714 IPC_END_MESSAGE_MAP()
713 715
714 return handled; 716 return handled;
715 } 717 }
716 718
717 void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) { 719 void RenderFrameImpl::OnNavigate(const FrameMsg_Navigate_Params& params) {
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 return; 1187 return;
1186 ImeEventGuard guard(GetRenderWidget()); 1188 ImeEventGuard guard(GetRenderWidget());
1187 frame_->extendSelectionAndDelete(before, after); 1189 frame_->extendSelectionAndDelete(before, after);
1188 } 1190 }
1189 1191
1190 1192
1191 void RenderFrameImpl::OnReload(bool ignore_cache) { 1193 void RenderFrameImpl::OnReload(bool ignore_cache) {
1192 frame_->reload(ignore_cache); 1194 frame_->reload(ignore_cache);
1193 } 1195 }
1194 1196
1197 void RenderFrameImpl::OnAddStyleSheetByURL(const std::string& url) {
1198 frame_->addStyleSheetByURL(WebString::fromUTF8(url));
1199 }
1200
1195 bool RenderFrameImpl::ShouldUpdateSelectionTextFromContextMenuParams( 1201 bool RenderFrameImpl::ShouldUpdateSelectionTextFromContextMenuParams(
1196 const base::string16& selection_text, 1202 const base::string16& selection_text,
1197 size_t selection_text_offset, 1203 size_t selection_text_offset,
1198 const gfx::Range& selection_range, 1204 const gfx::Range& selection_range,
1199 const ContextMenuParams& params) { 1205 const ContextMenuParams& params) {
1200 base::string16 trimmed_selection_text; 1206 base::string16 trimmed_selection_text;
1201 if (!selection_text.empty() && !selection_range.is_empty()) { 1207 if (!selection_text.empty() && !selection_range.is_empty()) {
1202 const int start = selection_range.GetMin() - selection_text_offset; 1208 const int start = selection_range.GetMin() - selection_text_offset;
1203 const size_t length = selection_range.length(); 1209 const size_t length = selection_range.length();
1204 if (start >= 0 && start + length <= selection_text.length()) { 1210 if (start >= 0 && start + length <= selection_text.length()) {
(...skipping 2281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3486 weak_factory_.GetWeakPtr(), 3492 weak_factory_.GetWeakPtr(),
3487 render_view_->media_player_manager_, 3493 render_view_->media_player_manager_,
3488 stream_texture_factory, 3494 stream_texture_factory,
3489 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), 3495 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(),
3490 new RenderMediaLog()); 3496 new RenderMediaLog());
3491 } 3497 }
3492 3498
3493 #endif 3499 #endif
3494 3500
3495 } // namespace content 3501 } // namespace content
OLDNEW
« content/browser/android/content_view_core_impl.cc ('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