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

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

Issue 11048045: Allow settings dialog to be opened via the app launcher, as a packaged app. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: license stanza Created 8 years, 2 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
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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // There is no process manager in some tests. 494 // There is no process manager in some tests.
495 if (!system->process_manager()) 495 if (!system->process_manager())
496 return NULL; 496 return NULL;
497 497
498 return system->process_manager()->GetExtensionForRenderViewHost( 498 return system->process_manager()->GetExtensionForRenderViewHost(
499 source_web_contents_->GetRenderViewHost()); 499 source_web_contents_->GetRenderViewHost());
500 } 500 }
501 501
502 void RenderViewContextMenu::AppendPlatformAppItems() { 502 void RenderViewContextMenu::AppendPlatformAppItems() {
503 const Extension* platform_app = GetExtension(); 503 const Extension* platform_app = GetExtension();
504 DCHECK(platform_app); 504
505 // The RVH might be for a process sandboxed from the extension.
506 if (!platform_app)
507 return;
508
505 DCHECK(platform_app->is_platform_app()); 509 DCHECK(platform_app->is_platform_app());
506 510
507 bool has_selection = !params_.selection_text.empty(); 511 bool has_selection = !params_.selection_text.empty();
508 512
509 // Add undo/redo, cut/copy/paste etc for text fields. 513 // Add undo/redo, cut/copy/paste etc for text fields.
510 if (params_.is_editable) 514 if (params_.is_editable)
511 AppendEditableItems(); 515 AppendEditableItems();
512 else if (has_selection) 516 else if (has_selection)
513 AppendCopyItem(); 517 AppendCopyItem();
514 518
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 source_web_contents_->GetRenderViewHost()-> 1819 source_web_contents_->GetRenderViewHost()->
1816 ExecuteMediaPlayerActionAtLocation(location, action); 1820 ExecuteMediaPlayerActionAtLocation(location, action);
1817 } 1821 }
1818 1822
1819 void RenderViewContextMenu::PluginActionAt( 1823 void RenderViewContextMenu::PluginActionAt(
1820 const gfx::Point& location, 1824 const gfx::Point& location,
1821 const WebPluginAction& action) { 1825 const WebPluginAction& action) {
1822 source_web_contents_->GetRenderViewHost()-> 1826 source_web_contents_->GetRenderViewHost()->
1823 ExecutePluginActionAtLocation(location, action); 1827 ExecutePluginActionAtLocation(location, action);
1824 } 1828 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings_app/settings_app.js ('k') | chrome/browser/ui/extensions/shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698