OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <functional> | 5 #include <functional> |
6 | 6 |
7 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 7 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
8 | 8 |
9 #include "app/clipboard/clipboard.h" | 9 #include "app/clipboard/clipboard.h" |
10 #include "app/clipboard/scoped_clipboard_writer.h" | 10 #include "app/clipboard/scoped_clipboard_writer.h" |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 | 845 |
846 case IDC_CONTENT_CONTEXT_OPENLINKOFFTHERECORD: | 846 case IDC_CONTENT_CONTEXT_OPENLINKOFFTHERECORD: |
847 return !profile_->IsOffTheRecord() && params_.link_url.is_valid(); | 847 return !profile_->IsOffTheRecord() && params_.link_url.is_valid(); |
848 | 848 |
849 case IDC_CONTENT_CONTEXT_OPENFRAMEOFFTHERECORD: | 849 case IDC_CONTENT_CONTEXT_OPENFRAMEOFFTHERECORD: |
850 return !profile_->IsOffTheRecord() && params_.frame_url.is_valid(); | 850 return !profile_->IsOffTheRecord() && params_.frame_url.is_valid(); |
851 | 851 |
852 case IDC_SPELLCHECK_ADD_TO_DICTIONARY: | 852 case IDC_SPELLCHECK_ADD_TO_DICTIONARY: |
853 return !params_.misspelled_word.empty(); | 853 return !params_.misspelled_word.empty(); |
854 | 854 |
855 #if defined(OS_CHROMEOS) | |
856 case IDC_PRINT: | 855 case IDC_PRINT: |
857 return false; | |
858 #else | |
859 case IDC_PRINT: | |
860 #endif | |
861 case IDC_CONTENT_CONTEXT_SEARCHWEBFOR: | 856 case IDC_CONTENT_CONTEXT_SEARCHWEBFOR: |
862 case IDC_CONTENT_CONTEXT_GOTOURL: | 857 case IDC_CONTENT_CONTEXT_GOTOURL: |
863 case IDC_SPELLCHECK_SUGGESTION_0: | 858 case IDC_SPELLCHECK_SUGGESTION_0: |
864 case IDC_SPELLCHECK_SUGGESTION_1: | 859 case IDC_SPELLCHECK_SUGGESTION_1: |
865 case IDC_SPELLCHECK_SUGGESTION_2: | 860 case IDC_SPELLCHECK_SUGGESTION_2: |
866 case IDC_SPELLCHECK_SUGGESTION_3: | 861 case IDC_SPELLCHECK_SUGGESTION_3: |
867 case IDC_SPELLCHECK_SUGGESTION_4: | 862 case IDC_SPELLCHECK_SUGGESTION_4: |
868 case IDC_SPELLPANEL_TOGGLE: | 863 case IDC_SPELLPANEL_TOGGLE: |
869 #if !defined(OS_MACOSX) | 864 #if !defined(OS_MACOSX) |
870 // TODO(jeremy): re-enable - http://crbug.com/34512 . | 865 // TODO(jeremy): re-enable - http://crbug.com/34512 . |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), | 1364 UTF8ToWide(profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)), |
1370 g_browser_process->clipboard()); | 1365 g_browser_process->clipboard()); |
1371 } | 1366 } |
1372 | 1367 |
1373 void RenderViewContextMenu::MediaPlayerActionAt( | 1368 void RenderViewContextMenu::MediaPlayerActionAt( |
1374 const gfx::Point& location, | 1369 const gfx::Point& location, |
1375 const WebMediaPlayerAction& action) { | 1370 const WebMediaPlayerAction& action) { |
1376 source_tab_contents_->render_view_host()->MediaPlayerActionAt( | 1371 source_tab_contents_->render_view_host()->MediaPlayerActionAt( |
1377 location, action); | 1372 location, action); |
1378 } | 1373 } |
OLD | NEW |