| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |