| 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 2796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2807 if (template_html.empty()) { | 2807 if (template_html.empty()) { |
| 2808 NOTREACHED() << "unable to load template. ID: " << template_resource_id; | 2808 NOTREACHED() << "unable to load template. ID: " << template_resource_id; |
| 2809 return ""; | 2809 return ""; |
| 2810 } | 2810 } |
| 2811 | 2811 |
| 2812 // "t" is the id of the templates root node. | 2812 // "t" is the id of the templates root node. |
| 2813 return jstemplate_builder::GetTemplatesHtml( | 2813 return jstemplate_builder::GetTemplatesHtml( |
| 2814 template_html, &error_strings, "t"); | 2814 template_html, &error_strings, "t"); |
| 2815 } | 2815 } |
| 2816 | 2816 |
| 2817 MessageLoop* RenderView::GetMessageLoopForIO() { | |
| 2818 // Assume that we have only one RenderThread in the process and the owner loop | |
| 2819 // of RenderThread is an IO message loop. | |
| 2820 if (RenderThread::current()) | |
| 2821 return RenderThread::current()->owner_loop(); | |
| 2822 return NULL; | |
| 2823 } | |
| 2824 | |
| 2825 void RenderView::OnMoveOrResizeStarted() { | 2817 void RenderView::OnMoveOrResizeStarted() { |
| 2826 if (webview()) | 2818 if (webview()) |
| 2827 webview()->HideAutofillPopup(); | 2819 webview()->HideAutofillPopup(); |
| 2828 } | 2820 } |
| 2829 | 2821 |
| 2830 void RenderView::OnResize(const gfx::Size& new_size, | 2822 void RenderView::OnResize(const gfx::Size& new_size, |
| 2831 const gfx::Rect& resizer_rect) { | 2823 const gfx::Rect& resizer_rect) { |
| 2832 if (webview()) | 2824 if (webview()) |
| 2833 webview()->HideAutofillPopup(); | 2825 webview()->HideAutofillPopup(); |
| 2834 RenderWidget::OnResize(new_size, resizer_rect); | 2826 RenderWidget::OnResize(new_size, resizer_rect); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3077 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); | 3069 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); |
| 3078 } | 3070 } |
| 3079 | 3071 |
| 3080 void RenderView::Print(WebFrame* frame, bool script_initiated) { | 3072 void RenderView::Print(WebFrame* frame, bool script_initiated) { |
| 3081 DCHECK(frame); | 3073 DCHECK(frame); |
| 3082 if (print_helper_.get() == NULL) { | 3074 if (print_helper_.get() == NULL) { |
| 3083 print_helper_.reset(new PrintWebViewHelper(this)); | 3075 print_helper_.reset(new PrintWebViewHelper(this)); |
| 3084 } | 3076 } |
| 3085 print_helper_->Print(frame, script_initiated); | 3077 print_helper_->Print(frame, script_initiated); |
| 3086 } | 3078 } |
| OLD | NEW |