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

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

Issue 6399001: Revert 72624 (due to crashes) - Implement pref policy for disabling incognito... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 7
8 #include "chrome/browser/tab_contents/render_view_context_menu.h" 8 #include "chrome/browser/tab_contents/render_view_context_menu.h"
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 case IDC_CONTENT_CONTEXT_PASTE: 936 case IDC_CONTENT_CONTEXT_PASTE:
937 return !!(params_.edit_flags & WebContextMenuData::CanPaste); 937 return !!(params_.edit_flags & WebContextMenuData::CanPaste);
938 938
939 case IDC_CONTENT_CONTEXT_DELETE: 939 case IDC_CONTENT_CONTEXT_DELETE:
940 return !!(params_.edit_flags & WebContextMenuData::CanDelete); 940 return !!(params_.edit_flags & WebContextMenuData::CanDelete);
941 941
942 case IDC_CONTENT_CONTEXT_SELECTALL: 942 case IDC_CONTENT_CONTEXT_SELECTALL:
943 return !!(params_.edit_flags & WebContextMenuData::CanSelectAll); 943 return !!(params_.edit_flags & WebContextMenuData::CanSelectAll);
944 944
945 case IDC_CONTENT_CONTEXT_OPENLINKOFFTHERECORD: 945 case IDC_CONTENT_CONTEXT_OPENLINKOFFTHERECORD:
946 return !profile_->IsOffTheRecord() && params_.link_url.is_valid() && 946 return !profile_->IsOffTheRecord() && params_.link_url.is_valid();
947 profile_->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled);
948 947
949 case IDC_SPELLCHECK_ADD_TO_DICTIONARY: 948 case IDC_SPELLCHECK_ADD_TO_DICTIONARY:
950 return !params_.misspelled_word.empty(); 949 return !params_.misspelled_word.empty();
951 950
952 case IDC_PRINT: 951 case IDC_PRINT:
953 return params_.media_type == WebContextMenuData::MediaTypeNone || 952 return params_.media_type == WebContextMenuData::MediaTypeNone ||
954 params_.media_flags & WebContextMenuData::MediaCanPrint; 953 params_.media_flags & WebContextMenuData::MediaCanPrint;
955 954
956 case IDC_CONTENT_CONTEXT_SEARCHWEBFOR: 955 case IDC_CONTENT_CONTEXT_SEARCHWEBFOR:
957 case IDC_CONTENT_CONTEXT_GOTOURL: 956 case IDC_CONTENT_CONTEXT_GOTOURL:
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 1476 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
1478 g_browser_process->clipboard()); 1477 g_browser_process->clipboard());
1479 } 1478 }
1480 1479
1481 void RenderViewContextMenu::MediaPlayerActionAt( 1480 void RenderViewContextMenu::MediaPlayerActionAt(
1482 const gfx::Point& location, 1481 const gfx::Point& location,
1483 const WebMediaPlayerAction& action) { 1482 const WebMediaPlayerAction& action) {
1484 source_tab_contents_->render_view_host()->MediaPlayerActionAt( 1483 source_tab_contents_->render_view_host()->MediaPlayerActionAt(
1485 location, action); 1484 location, action);
1486 } 1485 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_store_interface.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698