| 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 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1966 } | 1966 } |
| 1967 | 1967 |
| 1968 void RenderFrameImpl::OnReplaceMisspelling(const base::string16& text) { | 1968 void RenderFrameImpl::OnReplaceMisspelling(const base::string16& text) { |
| 1969 if (!frame_->hasSelection()) | 1969 if (!frame_->hasSelection()) |
| 1970 return; | 1970 return; |
| 1971 | 1971 |
| 1972 frame_->replaceMisspelledRange(text); | 1972 frame_->replaceMisspelledRange(text); |
| 1973 } | 1973 } |
| 1974 | 1974 |
| 1975 void RenderFrameImpl::OnCopyImageAt(int x, int y) { | 1975 void RenderFrameImpl::OnCopyImageAt(int x, int y) { |
| 1976 frame_->copyImageAt(WebPoint(x, y)); | 1976 blink::WebFloatRect viewport_position(x, y, 0, 0); |
| 1977 GetRenderWidget()->convertWindowToViewport(&viewport_position); |
| 1978 frame_->copyImageAt(WebPoint(viewport_position.x, viewport_position.y)); |
| 1977 } | 1979 } |
| 1978 | 1980 |
| 1979 void RenderFrameImpl::OnSaveImageAt(int x, int y) { | 1981 void RenderFrameImpl::OnSaveImageAt(int x, int y) { |
| 1980 frame_->saveImageAt(WebPoint(x, y)); | 1982 blink::WebFloatRect viewport_position(x, y, 0, 0); |
| 1983 GetRenderWidget()->convertWindowToViewport(&viewport_position); |
| 1984 frame_->saveImageAt(WebPoint(viewport_position.x, viewport_position.y)); |
| 1981 } | 1985 } |
| 1982 | 1986 |
| 1983 void RenderFrameImpl::OnAddMessageToConsole(ConsoleMessageLevel level, | 1987 void RenderFrameImpl::OnAddMessageToConsole(ConsoleMessageLevel level, |
| 1984 const std::string& message) { | 1988 const std::string& message) { |
| 1985 AddMessageToConsole(level, message); | 1989 AddMessageToConsole(level, message); |
| 1986 } | 1990 } |
| 1987 | 1991 |
| 1988 void RenderFrameImpl::OnJavaScriptExecuteRequest( | 1992 void RenderFrameImpl::OnJavaScriptExecuteRequest( |
| 1989 const base::string16& jscript, | 1993 const base::string16& jscript, |
| 1990 int id, | 1994 int id, |
| (...skipping 4644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6635 // event target. Potentially a Pepper plugin will receive the event. | 6639 // event target. Potentially a Pepper plugin will receive the event. |
| 6636 // In order to tell whether a plugin gets the last mouse event and which it | 6640 // In order to tell whether a plugin gets the last mouse event and which it |
| 6637 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6641 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6638 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6642 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6639 // |pepper_last_mouse_event_target_|. | 6643 // |pepper_last_mouse_event_target_|. |
| 6640 pepper_last_mouse_event_target_ = nullptr; | 6644 pepper_last_mouse_event_target_ = nullptr; |
| 6641 #endif | 6645 #endif |
| 6642 } | 6646 } |
| 6643 | 6647 |
| 6644 } // namespace content | 6648 } // namespace content |
| OLD | NEW |