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 <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 Loading... |
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 Loading... |
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 } |
OLD | NEW |