| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 IPC_MESSAGE_HANDLER(ViewMsg_DownloadFavIcon, OnDownloadFavIcon) | 1010 IPC_MESSAGE_HANDLER(ViewMsg_DownloadFavIcon, OnDownloadFavIcon) |
| 1011 IPC_MESSAGE_HANDLER(ViewMsg_ScriptEvalRequest, OnScriptEvalRequest) | 1011 IPC_MESSAGE_HANDLER(ViewMsg_ScriptEvalRequest, OnScriptEvalRequest) |
| 1012 IPC_MESSAGE_HANDLER(ViewMsg_CSSInsertRequest, OnCSSInsertRequest) | 1012 IPC_MESSAGE_HANDLER(ViewMsg_CSSInsertRequest, OnCSSInsertRequest) |
| 1013 IPC_MESSAGE_HANDLER(ViewMsg_AddMessageToConsole, OnAddMessageToConsole) | 1013 IPC_MESSAGE_HANDLER(ViewMsg_AddMessageToConsole, OnAddMessageToConsole) |
| 1014 IPC_MESSAGE_HANDLER(ViewMsg_ReservePageIDRange, OnReservePageIDRange) | 1014 IPC_MESSAGE_HANDLER(ViewMsg_ReservePageIDRange, OnReservePageIDRange) |
| 1015 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragEnter, OnDragTargetDragEnter) | 1015 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragEnter, OnDragTargetDragEnter) |
| 1016 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragOver, OnDragTargetDragOver) | 1016 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragOver, OnDragTargetDragOver) |
| 1017 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragLeave, OnDragTargetDragLeave) | 1017 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragLeave, OnDragTargetDragLeave) |
| 1018 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDrop, OnDragTargetDrop) | 1018 IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDrop, OnDragTargetDrop) |
| 1019 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) | 1019 IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) |
| 1020 IPC_MESSAGE_HANDLER(ViewMsg_SetDOMUIProperty, OnSetDOMUIProperty) | 1020 IPC_MESSAGE_HANDLER(ViewMsg_SetWebUIProperty, OnSetWebUIProperty) |
| 1021 IPC_MESSAGE_HANDLER(ViewMsg_DragSourceEndedOrMoved, | 1021 IPC_MESSAGE_HANDLER(ViewMsg_DragSourceEndedOrMoved, |
| 1022 OnDragSourceEndedOrMoved) | 1022 OnDragSourceEndedOrMoved) |
| 1023 IPC_MESSAGE_HANDLER(ViewMsg_DragSourceSystemDragEnded, | 1023 IPC_MESSAGE_HANDLER(ViewMsg_DragSourceSystemDragEnded, |
| 1024 OnDragSourceSystemDragEnded) | 1024 OnDragSourceSystemDragEnded) |
| 1025 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) | 1025 IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) |
| 1026 IPC_MESSAGE_HANDLER(ViewMsg_ScrollFocusedEditableNodeIntoView, | 1026 IPC_MESSAGE_HANDLER(ViewMsg_ScrollFocusedEditableNodeIntoView, |
| 1027 OnScrollFocusedEditableNodeIntoView) | 1027 OnScrollFocusedEditableNodeIntoView) |
| 1028 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) | 1028 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck) |
| 1029 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) | 1029 IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences) |
| 1030 IPC_MESSAGE_HANDLER(ViewMsg_SetAltErrorPageURL, OnSetAltErrorPageURL) | 1030 IPC_MESSAGE_HANDLER(ViewMsg_SetAltErrorPageURL, OnSetAltErrorPageURL) |
| (...skipping 3586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4617 const WebConsoleMessage::Level& level) { | 4617 const WebConsoleMessage::Level& level) { |
| 4618 WebFrame* web_frame = GetChildFrame(UTF16ToWideHack(frame_xpath)); | 4618 WebFrame* web_frame = GetChildFrame(UTF16ToWideHack(frame_xpath)); |
| 4619 if (web_frame) | 4619 if (web_frame) |
| 4620 web_frame->addMessageToConsole(WebConsoleMessage(level, message)); | 4620 web_frame->addMessageToConsole(WebConsoleMessage(level, message)); |
| 4621 } | 4621 } |
| 4622 | 4622 |
| 4623 void RenderView::OnAllowBindings(int enabled_bindings_flags) { | 4623 void RenderView::OnAllowBindings(int enabled_bindings_flags) { |
| 4624 enabled_bindings_ |= enabled_bindings_flags; | 4624 enabled_bindings_ |= enabled_bindings_flags; |
| 4625 } | 4625 } |
| 4626 | 4626 |
| 4627 void RenderView::OnSetDOMUIProperty(const std::string& name, | 4627 void RenderView::OnSetWebUIProperty(const std::string& name, |
| 4628 const std::string& value) { | 4628 const std::string& value) { |
| 4629 DCHECK(BindingsPolicy::is_dom_ui_enabled(enabled_bindings_)); | 4629 DCHECK(BindingsPolicy::is_dom_ui_enabled(enabled_bindings_)); |
| 4630 GetWebUIBindings()->SetProperty(name, value); | 4630 GetWebUIBindings()->SetProperty(name, value); |
| 4631 } | 4631 } |
| 4632 | 4632 |
| 4633 void RenderView::OnReservePageIDRange(int size_of_range) { | 4633 void RenderView::OnReservePageIDRange(int size_of_range) { |
| 4634 next_page_id_ += size_of_range + 1; | 4634 next_page_id_ += size_of_range + 1; |
| 4635 } | 4635 } |
| 4636 | 4636 |
| 4637 void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, | 4637 void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5717 } | 5717 } |
| 5718 } | 5718 } |
| 5719 | 5719 |
| 5720 void RenderView::OnContextMenuClosed( | 5720 void RenderView::OnContextMenuClosed( |
| 5721 const webkit_glue::CustomContextMenuContext& custom_context) { | 5721 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 5722 if (custom_context.is_pepper_menu) | 5722 if (custom_context.is_pepper_menu) |
| 5723 pepper_delegate_.OnContextMenuClosed(custom_context); | 5723 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 5724 else | 5724 else |
| 5725 context_menu_node_.reset(); | 5725 context_menu_node_.reset(); |
| 5726 } | 5726 } |
| OLD | NEW |