OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2435 DCHECK(BindingsPolicy::is_dom_ui_enabled(enabled_bindings_)); | 2435 DCHECK(BindingsPolicy::is_dom_ui_enabled(enabled_bindings_)); |
2436 dom_ui_bindings_.SetProperty(name, value); | 2436 dom_ui_bindings_.SetProperty(name, value); |
2437 } | 2437 } |
2438 | 2438 |
2439 void RenderView::OnReservePageIDRange(int size_of_range) { | 2439 void RenderView::OnReservePageIDRange(int size_of_range) { |
2440 next_page_id_ += size_of_range + 1; | 2440 next_page_id_ += size_of_range + 1; |
2441 } | 2441 } |
2442 | 2442 |
2443 void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, | 2443 void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
2444 const gfx::Point& screen_point, | 2444 const gfx::Point& screen_point, |
2445 bool ended) { | 2445 bool ended, bool cancelled) { |
2446 if (ended) | 2446 if (ended) { |
2447 webview()->DragSourceEndedAt(client_point, screen_point); | 2447 if (cancelled) |
2448 else | 2448 webview()->DragSourceCancelledAt(client_point, screen_point); |
| 2449 else |
| 2450 webview()->DragSourceEndedAt(client_point, screen_point); |
| 2451 } else { |
2449 webview()->DragSourceMovedTo(client_point, screen_point); | 2452 webview()->DragSourceMovedTo(client_point, screen_point); |
| 2453 } |
2450 } | 2454 } |
2451 | 2455 |
2452 void RenderView::OnDragSourceSystemDragEnded() { | 2456 void RenderView::OnDragSourceSystemDragEnded() { |
2453 webview()->DragSourceSystemDragEnded(); | 2457 webview()->DragSourceSystemDragEnded(); |
2454 } | 2458 } |
2455 | 2459 |
2456 void RenderView::OnUploadFileRequest(const ViewMsg_UploadFile_Params& p) { | 2460 void RenderView::OnUploadFileRequest(const ViewMsg_UploadFile_Params& p) { |
2457 webkit_glue::FileUploadData* f = new webkit_glue::FileUploadData; | 2461 webkit_glue::FileUploadData* f = new webkit_glue::FileUploadData; |
2458 f->file_path = p.file_path; | 2462 f->file_path = p.file_path; |
2459 f->form_name = p.form; | 2463 f->form_name = p.form; |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2953 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); | 2957 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); |
2954 } | 2958 } |
2955 | 2959 |
2956 void RenderView::Print(WebFrame* frame, bool script_initiated) { | 2960 void RenderView::Print(WebFrame* frame, bool script_initiated) { |
2957 DCHECK(frame); | 2961 DCHECK(frame); |
2958 if (print_helper_.get() == NULL) { | 2962 if (print_helper_.get() == NULL) { |
2959 print_helper_.reset(new PrintWebViewHelper(this)); | 2963 print_helper_.reset(new PrintWebViewHelper(this)); |
2960 } | 2964 } |
2961 print_helper_->Print(frame, script_initiated); | 2965 print_helper_->Print(frame, script_initiated); |
2962 } | 2966 } |
OLD | NEW |