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

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

Issue 9569042: Add reload item to default developer-mode platform app context menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix EmptyContextMenu Created 8 years, 9 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
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" 9 #include "chrome/browser/tab_contents/render_view_context_menu.h"
10 10
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 return NULL; 643 return NULL;
644 } 644 }
645 645
646 void RenderViewContextMenu::AppendPlatformAppItems( 646 void RenderViewContextMenu::AppendPlatformAppItems(
647 const Extension* platform_app) { 647 const Extension* platform_app) {
648 DCHECK(platform_app); 648 DCHECK(platform_app);
649 int index = 0; 649 int index = 0;
650 AppendExtensionItems(platform_app->id(), &index); 650 AppendExtensionItems(platform_app->id(), &index);
651 651
652 // Add dev tools for unpacked extensions. 652 // Add dev tools for unpacked extensions.
653 if (platform_app->location() == Extension::LOAD) 653 if (platform_app->location() == Extension::LOAD) {
654 menu_model_.AddItemWithStringId(IDC_RELOAD, IDS_CONTENT_CONTEXT_RELOAD);
654 AppendDeveloperItems(); 655 AppendDeveloperItems();
656 }
655 } 657 }
656 658
657 void RenderViewContextMenu::AppendPopupExtensionItems() { 659 void RenderViewContextMenu::AppendPopupExtensionItems() {
658 bool has_selection = !params_.selection_text.empty(); 660 bool has_selection = !params_.selection_text.empty();
659 661
660 if (params_.is_editable) 662 if (params_.is_editable)
661 AppendEditableItems(); 663 AppendEditableItems();
662 else if (has_selection) 664 else if (has_selection)
663 AppendCopyItem(); 665 AppendCopyItem();
664 666
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 source_web_contents_->GetRenderViewHost()-> 1992 source_web_contents_->GetRenderViewHost()->
1991 ExecuteMediaPlayerActionAtLocation(location, action); 1993 ExecuteMediaPlayerActionAtLocation(location, action);
1992 } 1994 }
1993 1995
1994 void RenderViewContextMenu::PluginActionAt( 1996 void RenderViewContextMenu::PluginActionAt(
1995 const gfx::Point& location, 1997 const gfx::Point& location,
1996 const WebPluginAction& action) { 1998 const WebPluginAction& action) {
1997 source_web_contents_->GetRenderViewHost()-> 1999 source_web_contents_->GetRenderViewHost()->
1998 ExecutePluginActionAtLocation(location, action); 2000 ExecutePluginActionAtLocation(location, action);
1999 } 2001 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698