OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "content/public/renderer/navigation_state.h" | 61 #include "content/public/renderer/navigation_state.h" |
62 #include "content/public/renderer/password_form_conversion_utils.h" | 62 #include "content/public/renderer/password_form_conversion_utils.h" |
63 #include "content/public/renderer/render_view_observer.h" | 63 #include "content/public/renderer/render_view_observer.h" |
64 #include "content/public/renderer/render_view_visitor.h" | 64 #include "content/public/renderer/render_view_visitor.h" |
65 #include "content/renderer/accessibility/renderer_accessibility.h" | 65 #include "content/renderer/accessibility/renderer_accessibility.h" |
66 #include "content/renderer/accessibility/renderer_accessibility_complete.h" | 66 #include "content/renderer/accessibility/renderer_accessibility_complete.h" |
67 #include "content/renderer/accessibility/renderer_accessibility_focus_only.h" | 67 #include "content/renderer/accessibility/renderer_accessibility_focus_only.h" |
68 #include "content/renderer/browser_plugin/browser_plugin.h" | 68 #include "content/renderer/browser_plugin/browser_plugin.h" |
69 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 69 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
70 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" | 70 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" |
| 71 #include "content/renderer/context_menu_params_builder.h" |
71 #include "content/renderer/device_orientation_dispatcher.h" | 72 #include "content/renderer/device_orientation_dispatcher.h" |
72 #include "content/renderer/devtools/devtools_agent.h" | 73 #include "content/renderer/devtools/devtools_agent.h" |
73 #include "content/renderer/disambiguation_popup_helper.h" | 74 #include "content/renderer/disambiguation_popup_helper.h" |
74 #include "content/renderer/dom_automation_controller.h" | 75 #include "content/renderer/dom_automation_controller.h" |
75 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 76 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
76 #include "content/renderer/external_popup_menu.h" | 77 #include "content/renderer/external_popup_menu.h" |
77 #include "content/renderer/geolocation_dispatcher.h" | 78 #include "content/renderer/geolocation_dispatcher.h" |
78 #include "content/renderer/gpu/input_handler_manager.h" | 79 #include "content/renderer/gpu/input_handler_manager.h" |
79 #include "content/renderer/gpu/render_widget_compositor.h" | 80 #include "content/renderer/gpu/render_widget_compositor.h" |
80 #include "content/renderer/idle_user_detector.h" | 81 #include "content/renderer/idle_user_detector.h" |
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2294 // response as RunJavaScriptMessage. | 2295 // response as RunJavaScriptMessage. |
2295 string16 ignored_result; | 2296 string16 ignored_result; |
2296 SendAndRunNestedMessageLoop(new ViewHostMsg_RunBeforeUnloadConfirm( | 2297 SendAndRunNestedMessageLoop(new ViewHostMsg_RunBeforeUnloadConfirm( |
2297 routing_id_, frame->document().url(), message, is_reload, | 2298 routing_id_, frame->document().url(), message, is_reload, |
2298 &success, &ignored_result)); | 2299 &success, &ignored_result)); |
2299 return success; | 2300 return success; |
2300 } | 2301 } |
2301 | 2302 |
2302 void RenderViewImpl::showContextMenu( | 2303 void RenderViewImpl::showContextMenu( |
2303 WebFrame* frame, const WebContextMenuData& data) { | 2304 WebFrame* frame, const WebContextMenuData& data) { |
2304 ContextMenuParams params(data); | 2305 ContextMenuParamsBuilder params(data); |
2305 | 2306 |
2306 // Plugins, e.g. PDF, don't currently update the render view when their | 2307 // Plugins, e.g. PDF, don't currently update the render view when their |
2307 // selected text changes, but the context menu params do contain the updated | 2308 // selected text changes, but the context menu params do contain the updated |
2308 // selection. If that's the case, update the render view's state just prior | 2309 // selection. If that's the case, update the render view's state just prior |
2309 // to showing the context menu. | 2310 // to showing the context menu. |
2310 // TODO(asvitkine): http://crbug.com/152432 | 2311 // TODO(asvitkine): http://crbug.com/152432 |
2311 if (ShouldUpdateSelectionTextFromContextMenuParams(selection_text_, | 2312 if (ShouldUpdateSelectionTextFromContextMenuParams(selection_text_, |
2312 selection_text_offset_, | 2313 selection_text_offset_, |
2313 selection_range_, | 2314 selection_range_, |
2314 params)) { | 2315 params)) { |
(...skipping 4215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6530 WebURL url = icon_urls[i].iconURL(); | 6531 WebURL url = icon_urls[i].iconURL(); |
6531 if (!url.isEmpty()) | 6532 if (!url.isEmpty()) |
6532 urls.push_back(FaviconURL(url, | 6533 urls.push_back(FaviconURL(url, |
6533 ToFaviconType(icon_urls[i].iconType()))); | 6534 ToFaviconType(icon_urls[i].iconType()))); |
6534 } | 6535 } |
6535 SendUpdateFaviconURL(urls); | 6536 SendUpdateFaviconURL(urls); |
6536 } | 6537 } |
6537 | 6538 |
6538 | 6539 |
6539 } // namespace content | 6540 } // namespace content |
OLD | NEW |