OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
10 | 10 |
(...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1836 string16 keyword(TemplateURLService::GenerateKeyword(params_.page_url, | 1836 string16 keyword(TemplateURLService::GenerateKeyword(params_.page_url, |
1837 false)); | 1837 false)); |
1838 TemplateURLData data; | 1838 TemplateURLData data; |
1839 data.short_name = keyword; | 1839 data.short_name = keyword; |
1840 data.SetKeyword(keyword); | 1840 data.SetKeyword(keyword); |
1841 data.SetURL(params_.keyword_url.spec()); | 1841 data.SetURL(params_.keyword_url.spec()); |
1842 data.favicon_url = | 1842 data.favicon_url = |
1843 TemplateURL::GenerateFaviconURL(params_.page_url.GetOrigin()); | 1843 TemplateURL::GenerateFaviconURL(params_.page_url.GetOrigin()); |
1844 // Takes ownership of the TemplateURL. | 1844 // Takes ownership of the TemplateURL. |
1845 tab_contents_wrapper->search_engine_tab_helper()->delegate()-> | 1845 tab_contents_wrapper->search_engine_tab_helper()->delegate()-> |
1846 ConfirmAddSearchProvider(new TemplateURL(data), profile_); | 1846 ConfirmAddSearchProvider(new TemplateURL(profile_, data), profile_); |
1847 } | 1847 } |
1848 break; | 1848 break; |
1849 } | 1849 } |
1850 | 1850 |
1851 case IDC_CONTENT_CONTEXT_SPEECH_INPUT_FILTER_PROFANITIES: { | 1851 case IDC_CONTENT_CONTEXT_SPEECH_INPUT_FILTER_PROFANITIES: { |
1852 PrefService* prefs = profile_->GetPrefs(); | 1852 PrefService* prefs = profile_->GetPrefs(); |
1853 const bool filter = !prefs->GetBoolean( | 1853 const bool filter = !prefs->GetBoolean( |
1854 prefs::kSpeechRecognitionFilterProfanities); | 1854 prefs::kSpeechRecognitionFilterProfanities); |
1855 prefs->SetBoolean(prefs::kSpeechRecognitionFilterProfanities, filter); | 1855 prefs->SetBoolean(prefs::kSpeechRecognitionFilterProfanities, filter); |
1856 profile_->GetSpeechRecognitionPreferences()->SetFilterProfanities(filter); | 1856 profile_->GetSpeechRecognitionPreferences()->SetFilterProfanities(filter); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 source_web_contents_->GetRenderViewHost()-> | 1983 source_web_contents_->GetRenderViewHost()-> |
1984 ExecuteMediaPlayerActionAtLocation(location, action); | 1984 ExecuteMediaPlayerActionAtLocation(location, action); |
1985 } | 1985 } |
1986 | 1986 |
1987 void RenderViewContextMenu::PluginActionAt( | 1987 void RenderViewContextMenu::PluginActionAt( |
1988 const gfx::Point& location, | 1988 const gfx::Point& location, |
1989 const WebPluginAction& action) { | 1989 const WebPluginAction& action) { |
1990 source_web_contents_->GetRenderViewHost()-> | 1990 source_web_contents_->GetRenderViewHost()-> |
1991 ExecutePluginActionAtLocation(location, action); | 1991 ExecutePluginActionAtLocation(location, action); |
1992 } | 1992 } |
OLD | NEW |