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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 years, 4 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
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/search/instant_service.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 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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 // language. 1160 // language.
1161 return ((params_.edit_flags & WebContextMenuData::CanTranslate) != 0) && 1161 return ((params_.edit_flags & WebContextMenuData::CanTranslate) != 0) &&
1162 !original_lang.empty() && // Did we receive the page language yet? 1162 !original_lang.empty() && // Did we receive the page language yet?
1163 !chrome_translate_client->GetLanguageState().IsPageTranslated() && 1163 !chrome_translate_client->GetLanguageState().IsPageTranslated() &&
1164 !embedder_web_contents_->GetInterstitialPage() && 1164 !embedder_web_contents_->GetInterstitialPage() &&
1165 // There are some application locales which can't be used as a 1165 // There are some application locales which can't be used as a
1166 // target language for translation. 1166 // target language for translation.
1167 translate::TranslateDownloadManager::IsSupportedLanguage( 1167 translate::TranslateDownloadManager::IsSupportedLanguage(
1168 target_lang) && 1168 target_lang) &&
1169 // Disable on the Instant Extended NTP. 1169 // Disable on the Instant Extended NTP.
1170 !chrome::IsInstantNTP(embedder_web_contents_); 1170 !search::IsInstantNTP(embedder_web_contents_);
1171 } 1171 }
1172 1172
1173 case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB: 1173 case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB:
1174 case IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW: 1174 case IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW:
1175 return params_.link_url.is_valid(); 1175 return params_.link_url.is_valid();
1176 1176
1177 case IDC_CONTENT_CONTEXT_COPYLINKLOCATION: 1177 case IDC_CONTENT_CONTEXT_COPYLINKLOCATION:
1178 return params_.unfiltered_link_url.is_valid(); 1178 return params_.unfiltered_link_url.is_valid();
1179 1179
1180 case IDC_CONTENT_CONTEXT_SAVELINKAS: { 1180 case IDC_CONTENT_CONTEXT_SAVELINKAS: {
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 source_web_contents_->GetRenderViewHost()-> 1929 source_web_contents_->GetRenderViewHost()->
1930 ExecuteMediaPlayerActionAtLocation(location, action); 1930 ExecuteMediaPlayerActionAtLocation(location, action);
1931 } 1931 }
1932 1932
1933 void RenderViewContextMenu::PluginActionAt( 1933 void RenderViewContextMenu::PluginActionAt(
1934 const gfx::Point& location, 1934 const gfx::Point& location,
1935 const WebPluginAction& action) { 1935 const WebPluginAction& action) {
1936 source_web_contents_->GetRenderViewHost()-> 1936 source_web_contents_->GetRenderViewHost()->
1937 ExecutePluginActionAtLocation(location, action); 1937 ExecutePluginActionAtLocation(location, action);
1938 } 1938 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/search/instant_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698