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

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

Issue 6576020: Remove Gears from Chrome (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: ready to review Created 9 years, 10 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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 1469
1470 NavigationEntry *active_entry = 1470 NavigationEntry *active_entry =
1471 source_tab_contents_->controller().GetActiveEntry(); 1471 source_tab_contents_->controller().GetActiveEntry();
1472 if (!active_entry) 1472 if (!active_entry)
1473 return false; 1473 return false;
1474 1474
1475 // Don't inspect view source. 1475 // Don't inspect view source.
1476 if (active_entry->IsViewSourceMode()) 1476 if (active_entry->IsViewSourceMode())
1477 return false; 1477 return false;
1478 1478
1479 // Don't inspect HTML dialogs (doesn't work anyway).
1480 if (active_entry->url().SchemeIs(chrome::kGearsScheme))
1481 return false;
1482
1483 // Don't inspect about:network, about:memory, etc. 1479 // Don't inspect about:network, about:memory, etc.
1484 // However, we do want to inspect about:blank, which is often 1480 // However, we do want to inspect about:blank, which is often
1485 // used by ordinary web pages. 1481 // used by ordinary web pages.
1486 if (active_entry->virtual_url().SchemeIs(chrome::kAboutScheme) && 1482 if (active_entry->virtual_url().SchemeIs(chrome::kAboutScheme) &&
1487 !LowerCaseEqualsASCII(active_entry->virtual_url().path(), "blank")) 1483 !LowerCaseEqualsASCII(active_entry->virtual_url().path(), "blank"))
1488 return false; 1484 return false;
1489 1485
1490 if (id == IDC_CONTENT_CONTEXT_INSPECTELEMENT) { 1486 if (id == IDC_CONTENT_CONTEXT_INSPECTELEMENT) {
1491 // Don't enable the web inspector if JavaScript is disabled. 1487 // Don't enable the web inspector if JavaScript is disabled.
1492 if (!profile_->GetPrefs()->GetBoolean(prefs::kWebKitJavascriptEnabled) || 1488 if (!profile_->GetPrefs()->GetBoolean(prefs::kWebKitJavascriptEnabled) ||
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages), 1528 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages),
1533 g_browser_process->clipboard()); 1529 g_browser_process->clipboard());
1534 } 1530 }
1535 1531
1536 void RenderViewContextMenu::MediaPlayerActionAt( 1532 void RenderViewContextMenu::MediaPlayerActionAt(
1537 const gfx::Point& location, 1533 const gfx::Point& location,
1538 const WebMediaPlayerAction& action) { 1534 const WebMediaPlayerAction& action) {
1539 source_tab_contents_->render_view_host()->MediaPlayerActionAt( 1535 source_tab_contents_->render_view_host()->MediaPlayerActionAt(
1540 location, action); 1536 location, action);
1541 } 1537 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698