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

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

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years 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) 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 <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 "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 840
841 case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB: 841 case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB:
842 case IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW: 842 case IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW:
843 return params_.link_url.is_valid(); 843 return params_.link_url.is_valid();
844 844
845 case IDC_CONTENT_CONTEXT_COPYLINKLOCATION: 845 case IDC_CONTENT_CONTEXT_COPYLINKLOCATION:
846 return params_.unfiltered_link_url.is_valid(); 846 return params_.unfiltered_link_url.is_valid();
847 847
848 case IDC_CONTENT_CONTEXT_SAVELINKAS: 848 case IDC_CONTENT_CONTEXT_SAVELINKAS:
849 return params_.link_url.is_valid() && 849 return params_.link_url.is_valid() &&
850 URLRequest::IsHandledURL(params_.link_url); 850 net::URLRequest::IsHandledURL(params_.link_url);
851 851
852 case IDC_CONTENT_CONTEXT_SAVEIMAGEAS: 852 case IDC_CONTENT_CONTEXT_SAVEIMAGEAS:
853 return params_.src_url.is_valid() && 853 return params_.src_url.is_valid() &&
854 URLRequest::IsHandledURL(params_.src_url); 854 net::URLRequest::IsHandledURL(params_.src_url);
855 855
856 case IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB: 856 case IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB:
857 // The images shown in the most visited thumbnails do not currently open 857 // The images shown in the most visited thumbnails do not currently open
858 // in a new tab as they should. Disabling this context menu option for 858 // in a new tab as they should. Disabling this context menu option for
859 // now, as a quick hack, before we resolve this issue (Issue = 2608). 859 // now, as a quick hack, before we resolve this issue (Issue = 2608).
860 // TODO(sidchat): Enable this option once this issue is resolved. 860 // TODO(sidchat): Enable this option once this issue is resolved.
861 if (params_.src_url.scheme() == chrome::kChromeUIScheme || 861 if (params_.src_url.scheme() == chrome::kChromeUIScheme ||
862 !params_.src_url.is_valid()) 862 !params_.src_url.is_valid())
863 return false; 863 return false;
864 return true; 864 return true;
(...skipping 23 matching lines...) Expand all
888 WebContextMenuData::MediaHasVideo) != 0; 888 WebContextMenuData::MediaHasVideo) != 0;
889 889
890 case IDC_CONTENT_CONTEXT_COPYAVLOCATION: 890 case IDC_CONTENT_CONTEXT_COPYAVLOCATION:
891 case IDC_CONTENT_CONTEXT_COPYIMAGELOCATION: 891 case IDC_CONTENT_CONTEXT_COPYIMAGELOCATION:
892 return params_.src_url.is_valid(); 892 return params_.src_url.is_valid();
893 893
894 case IDC_CONTENT_CONTEXT_SAVEAVAS: 894 case IDC_CONTENT_CONTEXT_SAVEAVAS:
895 return (params_.media_flags & 895 return (params_.media_flags &
896 WebContextMenuData::MediaCanSave) && 896 WebContextMenuData::MediaCanSave) &&
897 params_.src_url.is_valid() && 897 params_.src_url.is_valid() &&
898 URLRequest::IsHandledURL(params_.src_url); 898 net::URLRequest::IsHandledURL(params_.src_url);
899 899
900 case IDC_CONTENT_CONTEXT_OPENAVNEWTAB: 900 case IDC_CONTENT_CONTEXT_OPENAVNEWTAB:
901 return true; 901 return true;
902 902
903 case IDC_SAVE_PAGE: { 903 case IDC_SAVE_PAGE: {
904 // Instead of using GetURL here, we use url() (which is the "real" url of 904 // Instead of using GetURL here, we use url() (which is the "real" url of
905 // the page) from the NavigationEntry because its reflects their origin 905 // the page) from the NavigationEntry because its reflects their origin
906 // rather than the display one (returned by GetURL) which may be 906 // rather than the display one (returned by GetURL) which may be
907 // different (like having "view-source:" on the front). 907 // different (like having "view-source:" on the front).
908 NavigationEntry* active_entry = 908 NavigationEntry* active_entry =
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 1486 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
1487 g_browser_process->clipboard()); 1487 g_browser_process->clipboard());
1488 } 1488 }
1489 1489
1490 void RenderViewContextMenu::MediaPlayerActionAt( 1490 void RenderViewContextMenu::MediaPlayerActionAt(
1491 const gfx::Point& location, 1491 const gfx::Point& location,
1492 const WebMediaPlayerAction& action) { 1492 const WebMediaPlayerAction& action) {
1493 source_tab_contents_->render_view_host()->MediaPlayerActionAt( 1493 source_tab_contents_->render_view_host()->MediaPlayerActionAt(
1494 location, action); 1494 location, action);
1495 } 1495 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698