| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 if (!webview()) | 1948 if (!webview()) |
| 1949 return; | 1949 return; |
| 1950 | 1950 |
| 1951 std::string state; | 1951 std::string state; |
| 1952 if (!webview()->GetMainFrame()->GetCurrentHistoryState(&state)) | 1952 if (!webview()->GetMainFrame()->GetCurrentHistoryState(&state)) |
| 1953 return; | 1953 return; |
| 1954 Send(new ViewHostMsg_UpdateState(routing_id_, page_id_, state)); | 1954 Send(new ViewHostMsg_UpdateState(routing_id_, page_id_, state)); |
| 1955 } | 1955 } |
| 1956 | 1956 |
| 1957 void RenderView::ShowContextMenu(WebView* webview, | 1957 void RenderView::ShowContextMenu(WebView* webview, |
| 1958 ContextNode::Type type, | 1958 ContextNode node, |
| 1959 int x, | 1959 int x, |
| 1960 int y, | 1960 int y, |
| 1961 const GURL& link_url, | 1961 const GURL& link_url, |
| 1962 const GURL& image_url, | 1962 const GURL& image_url, |
| 1963 const GURL& page_url, | 1963 const GURL& page_url, |
| 1964 const GURL& frame_url, | 1964 const GURL& frame_url, |
| 1965 const std::wstring& selection_text, | 1965 const std::wstring& selection_text, |
| 1966 const std::wstring& misspelled_word, | 1966 const std::wstring& misspelled_word, |
| 1967 int edit_flags, | 1967 int edit_flags, |
| 1968 const std::string& security_info) { | 1968 const std::string& security_info) { |
| 1969 ViewHostMsg_ContextMenu_Params params; | 1969 ViewHostMsg_ContextMenu_Params params; |
| 1970 params.type = type; | 1970 params.node = node; |
| 1971 params.x = x; | 1971 params.x = x; |
| 1972 params.y = y; | 1972 params.y = y; |
| 1973 params.image_url = image_url; | 1973 params.image_url = image_url; |
| 1974 params.link_url = link_url; | 1974 params.link_url = link_url; |
| 1975 params.page_url = page_url; | 1975 params.page_url = page_url; |
| 1976 params.frame_url = frame_url; | 1976 params.frame_url = frame_url; |
| 1977 params.selection_text = selection_text; | 1977 params.selection_text = selection_text; |
| 1978 params.misspelled_word = misspelled_word; | 1978 params.misspelled_word = misspelled_word; |
| 1979 params.spellcheck_enabled = | 1979 params.spellcheck_enabled = |
| 1980 webview->GetFocusedFrame()->SpellCheckEnabled(); | 1980 webview->GetFocusedFrame()->SpellCheckEnabled(); |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2771 template_resource_id)); | 2771 template_resource_id)); |
| 2772 | 2772 |
| 2773 if (template_html.empty()) { | 2773 if (template_html.empty()) { |
| 2774 NOTREACHED() << "unable to load template. ID: " << template_resource_id; | 2774 NOTREACHED() << "unable to load template. ID: " << template_resource_id; |
| 2775 return ""; | 2775 return ""; |
| 2776 } | 2776 } |
| 2777 // "t" is the id of the templates root node. | 2777 // "t" is the id of the templates root node. |
| 2778 return jstemplate_builder::GetTemplateHtml( | 2778 return jstemplate_builder::GetTemplateHtml( |
| 2779 template_html, &error_strings, "t"); | 2779 template_html, &error_strings, "t"); |
| 2780 } | 2780 } |
| OLD | NEW |