| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/renderer_host/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "chrome/common/thumbnail_score.h" | 50 #include "chrome/common/thumbnail_score.h" |
| 51 #include "chrome/common/translate_errors.h" | 51 #include "chrome/common/translate_errors.h" |
| 52 #include "chrome/common/url_constants.h" | 52 #include "chrome/common/url_constants.h" |
| 53 #include "chrome/common/web_apps.h" | 53 #include "chrome/common/web_apps.h" |
| 54 #include "gfx/native_widget_types.h" | 54 #include "gfx/native_widget_types.h" |
| 55 #include "net/base/net_util.h" | 55 #include "net/base/net_util.h" |
| 56 #include "printing/native_metafile.h" | 56 #include "printing/native_metafile.h" |
| 57 #include "third_party/skia/include/core/SkBitmap.h" | 57 #include "third_party/skia/include/core/SkBitmap.h" |
| 58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
| 59 #include "webkit/glue/context_menu.h" | 59 #include "webkit/glue/context_menu.h" |
| 60 #include "webkit/glue/form_data.h" | |
| 61 #include "webkit/glue/form_field.h" | |
| 62 #include "webkit/glue/password_form_dom_manager.h" | |
| 63 #include "webkit/glue/webaccessibility.h" | 60 #include "webkit/glue/webaccessibility.h" |
| 64 #include "webkit/glue/webdropdata.h" | 61 #include "webkit/glue/webdropdata.h" |
| 65 | 62 |
| 66 using base::TimeDelta; | 63 using base::TimeDelta; |
| 67 using webkit_glue::FormData; | |
| 68 using webkit_glue::FormField; | |
| 69 using webkit_glue::PasswordForm; | |
| 70 using webkit_glue::PasswordFormDomManager; | |
| 71 using webkit_glue::PasswordFormFillData; | |
| 72 using WebKit::WebConsoleMessage; | 64 using WebKit::WebConsoleMessage; |
| 73 using WebKit::WebDragOperation; | 65 using WebKit::WebDragOperation; |
| 74 using WebKit::WebDragOperationNone; | 66 using WebKit::WebDragOperationNone; |
| 75 using WebKit::WebDragOperationsMask; | 67 using WebKit::WebDragOperationsMask; |
| 76 using WebKit::WebFindOptions; | 68 using WebKit::WebFindOptions; |
| 77 using WebKit::WebInputEvent; | 69 using WebKit::WebInputEvent; |
| 78 using WebKit::WebMediaPlayerAction; | 70 using WebKit::WebMediaPlayerAction; |
| 79 using WebKit::WebTextDirection; | 71 using WebKit::WebTextDirection; |
| 80 | 72 |
| 81 namespace { | 73 namespace { |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 } | 414 } |
| 423 | 415 |
| 424 void RenderViewHost::ResetPageEncodingToDefault() { | 416 void RenderViewHost::ResetPageEncodingToDefault() { |
| 425 Send(new ViewMsg_ResetPageEncodingToDefault(routing_id())); | 417 Send(new ViewMsg_ResetPageEncodingToDefault(routing_id())); |
| 426 } | 418 } |
| 427 | 419 |
| 428 void RenderViewHost::SetAlternateErrorPageURL(const GURL& url) { | 420 void RenderViewHost::SetAlternateErrorPageURL(const GURL& url) { |
| 429 Send(new ViewMsg_SetAltErrorPageURL(routing_id(), url)); | 421 Send(new ViewMsg_SetAltErrorPageURL(routing_id(), url)); |
| 430 } | 422 } |
| 431 | 423 |
| 432 void RenderViewHost::FillPasswordForm( | |
| 433 const webkit_glue::PasswordFormFillData& form_data) { | |
| 434 Send(new ViewMsg_FillPasswordForm(routing_id(), form_data)); | |
| 435 } | |
| 436 | |
| 437 void RenderViewHost::DragTargetDragEnter( | 424 void RenderViewHost::DragTargetDragEnter( |
| 438 const WebDropData& drop_data, | 425 const WebDropData& drop_data, |
| 439 const gfx::Point& client_pt, | 426 const gfx::Point& client_pt, |
| 440 const gfx::Point& screen_pt, | 427 const gfx::Point& screen_pt, |
| 441 WebDragOperationsMask operations_allowed) { | 428 WebDragOperationsMask operations_allowed) { |
| 442 // Grant the renderer the ability to load the drop_data. | 429 // Grant the renderer the ability to load the drop_data. |
| 443 ChildProcessSecurityPolicy* policy = | 430 ChildProcessSecurityPolicy* policy = |
| 444 ChildProcessSecurityPolicy::GetInstance(); | 431 ChildProcessSecurityPolicy::GetInstance(); |
| 445 policy->GrantRequestURL(process()->id(), drop_data.url); | 432 policy->GrantRequestURL(process()->id(), drop_data.url); |
| 446 for (std::vector<string16>::const_iterator iter(drop_data.filenames.begin()); | 433 for (std::vector<string16>::const_iterator iter(drop_data.filenames.begin()); |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1780 if (printer_query.get()) { | 1767 if (printer_query.get()) { |
| 1781 BrowserThread::PostTask( | 1768 BrowserThread::PostTask( |
| 1782 BrowserThread::IO, FROM_HERE, | 1769 BrowserThread::IO, FROM_HERE, |
| 1783 NewRunnableMethod(printer_query.get(), | 1770 NewRunnableMethod(printer_query.get(), |
| 1784 &printing::PrinterQuery::StopWorker)); | 1771 &printing::PrinterQuery::StopWorker)); |
| 1785 } | 1772 } |
| 1786 | 1773 |
| 1787 // Send the printingDone msg for now. | 1774 // Send the printingDone msg for now. |
| 1788 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true)); | 1775 Send(new ViewMsg_PrintingDone(routing_id(), params.document_cookie, true)); |
| 1789 } | 1776 } |
| OLD | NEW |