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

Side by Side Diff: chrome/browser/translate/translate_manager_browsertest.cc

Issue 23200006: Don't show the search-by-image menu item when the image is blocked (no image pixel data) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | content/common/view_messages.h » ('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) 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 <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 namespace { 327 namespace {
328 328
329 class TestRenderViewContextMenu : public RenderViewContextMenu { 329 class TestRenderViewContextMenu : public RenderViewContextMenu {
330 public: 330 public:
331 static TestRenderViewContextMenu* CreateContextMenu( 331 static TestRenderViewContextMenu* CreateContextMenu(
332 content::WebContents* web_contents) { 332 content::WebContents* web_contents) {
333 content::ContextMenuParams params; 333 content::ContextMenuParams params;
334 params.media_type = WebKit::WebContextMenuData::MediaTypeNone; 334 params.media_type = WebKit::WebContextMenuData::MediaTypeNone;
335 params.x = 0; 335 params.x = 0;
336 params.y = 0; 336 params.y = 0;
337 params.is_image_blocked = false; 337 params.has_image_contents = true;
338 params.media_flags = 0; 338 params.media_flags = 0;
339 params.spellcheck_enabled = false; 339 params.spellcheck_enabled = false;
340 params.is_editable = false; 340 params.is_editable = false;
341 params.page_url = web_contents->GetController().GetActiveEntry()->GetURL(); 341 params.page_url = web_contents->GetController().GetActiveEntry()->GetURL();
342 #if defined(OS_MACOSX) 342 #if defined(OS_MACOSX)
343 params.writing_direction_default = 0; 343 params.writing_direction_default = 0;
344 params.writing_direction_left_to_right = 0; 344 params.writing_direction_left_to_right = 0;
345 params.writing_direction_right_to_left = 0; 345 params.writing_direction_right_to_left = 0;
346 #endif // OS_MACOSX 346 #endif // OS_MACOSX
347 params.edit_flags = WebKit::WebContextMenuData::CanTranslate; 347 params.edit_flags = WebKit::WebContextMenuData::CanTranslate;
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 content::WebContents* current_web_contents = 1454 content::WebContents* current_web_contents =
1455 browser()->tab_strip_model()->GetActiveWebContents(); 1455 browser()->tab_strip_model()->GetActiveWebContents();
1456 content::Source<content::WebContents> source(current_web_contents); 1456 content::Source<content::WebContents> source(current_web_contents);
1457 1457
1458 ui_test_utils::WindowedNotificationObserverWithDetails< 1458 ui_test_utils::WindowedNotificationObserverWithDetails<
1459 LanguageDetectionDetails> 1459 LanguageDetectionDetails>
1460 fr_language_detected_signal(chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED, 1460 fr_language_detected_signal(chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
1461 source); 1461 source);
1462 fr_language_detected_signal.Wait(); 1462 fr_language_detected_signal.Wait();
1463 } 1463 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698