OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/renderer_context_menu/render_view_context_menu.h" | 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 if (!model) | 1745 if (!model) |
1746 return; | 1746 return; |
1747 model->Load(); | 1747 model->Load(); |
1748 | 1748 |
1749 SearchEngineTabHelper* search_engine_tab_helper = | 1749 SearchEngineTabHelper* search_engine_tab_helper = |
1750 SearchEngineTabHelper::FromWebContents(source_web_contents_); | 1750 SearchEngineTabHelper::FromWebContents(source_web_contents_); |
1751 if (search_engine_tab_helper && | 1751 if (search_engine_tab_helper && |
1752 search_engine_tab_helper->delegate()) { | 1752 search_engine_tab_helper->delegate()) { |
1753 base::string16 keyword(TemplateURL::GenerateKeyword(params_.page_url)); | 1753 base::string16 keyword(TemplateURL::GenerateKeyword(params_.page_url)); |
1754 TemplateURLData data; | 1754 TemplateURLData data; |
1755 data.short_name = keyword; | 1755 data.SetShortName(keyword); |
1756 data.SetKeyword(keyword); | 1756 data.SetKeyword(keyword); |
1757 data.SetURL(params_.keyword_url.spec()); | 1757 data.SetURL(params_.keyword_url.spec()); |
1758 data.favicon_url = | 1758 data.favicon_url = |
1759 TemplateURL::GenerateFaviconURL(params_.page_url.GetOrigin()); | 1759 TemplateURL::GenerateFaviconURL(params_.page_url.GetOrigin()); |
1760 // Takes ownership of the TemplateURL. | 1760 // Takes ownership of the TemplateURL. |
1761 search_engine_tab_helper->delegate()->ConfirmAddSearchProvider( | 1761 search_engine_tab_helper->delegate()->ConfirmAddSearchProvider( |
1762 new TemplateURL(data), GetProfile()); | 1762 new TemplateURL(data), GetProfile()); |
1763 } | 1763 } |
1764 break; | 1764 break; |
1765 } | 1765 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1861 source_web_contents_->GetRenderViewHost()-> | 1861 source_web_contents_->GetRenderViewHost()-> |
1862 ExecuteMediaPlayerActionAtLocation(location, action); | 1862 ExecuteMediaPlayerActionAtLocation(location, action); |
1863 } | 1863 } |
1864 | 1864 |
1865 void RenderViewContextMenu::PluginActionAt( | 1865 void RenderViewContextMenu::PluginActionAt( |
1866 const gfx::Point& location, | 1866 const gfx::Point& location, |
1867 const WebPluginAction& action) { | 1867 const WebPluginAction& action) { |
1868 source_web_contents_->GetRenderViewHost()-> | 1868 source_web_contents_->GetRenderViewHost()-> |
1869 ExecutePluginActionAtLocation(location, action); | 1869 ExecutePluginActionAtLocation(location, action); |
1870 } | 1870 } |
OLD | NEW |