| 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 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3122 NavigationState::FromDataSource(frame->provisionalDataSource()); | 3122 NavigationState::FromDataSource(frame->provisionalDataSource()); |
| 3123 navigation_state->set_alt_error_page_fetcher( | 3123 navigation_state->set_alt_error_page_fetcher( |
| 3124 new AltErrorPageResourceFetcher( | 3124 new AltErrorPageResourceFetcher( |
| 3125 error_page_url, frame, error, | 3125 error_page_url, frame, error, |
| 3126 NewCallback(this, &RenderView::AltErrorPageFinished))); | 3126 NewCallback(this, &RenderView::AltErrorPageFinished))); |
| 3127 return true; | 3127 return true; |
| 3128 } | 3128 } |
| 3129 | 3129 |
| 3130 std::string RenderView::GetAltHTMLForTemplate( | 3130 std::string RenderView::GetAltHTMLForTemplate( |
| 3131 const DictionaryValue& error_strings, int template_resource_id) const { | 3131 const DictionaryValue& error_strings, int template_resource_id) const { |
| 3132 const StringPiece template_html( | 3132 const base::StringPiece template_html( |
| 3133 ResourceBundle::GetSharedInstance().GetRawDataResource( | 3133 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 3134 template_resource_id)); | 3134 template_resource_id)); |
| 3135 | 3135 |
| 3136 if (template_html.empty()) { | 3136 if (template_html.empty()) { |
| 3137 NOTREACHED() << "unable to load template. ID: " << template_resource_id; | 3137 NOTREACHED() << "unable to load template. ID: " << template_resource_id; |
| 3138 return ""; | 3138 return ""; |
| 3139 } | 3139 } |
| 3140 | 3140 |
| 3141 // "t" is the id of the templates root node. | 3141 // "t" is the id of the templates root node. |
| 3142 return jstemplate_builder::GetTemplatesHtml( | 3142 return jstemplate_builder::GetTemplatesHtml( |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3463 EditCommands::iterator end = edit_commands_.end(); | 3463 EditCommands::iterator end = edit_commands_.end(); |
| 3464 | 3464 |
| 3465 for (; it != end; ++it) { | 3465 for (; it != end; ++it) { |
| 3466 if (!frame->executeCommand(WebString::fromUTF8(it->name), | 3466 if (!frame->executeCommand(WebString::fromUTF8(it->name), |
| 3467 WebString::fromUTF8(it->value))) | 3467 WebString::fromUTF8(it->value))) |
| 3468 break; | 3468 break; |
| 3469 } | 3469 } |
| 3470 | 3470 |
| 3471 return true; | 3471 return true; |
| 3472 } | 3472 } |
| OLD | NEW |