Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/renderer/render_view.cc

Issue 16510: Fixes bug 1925 (context menus for text selections in... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/glue/context_menu_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/glue/context_menu_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698