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