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

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

Issue 15947007: Move application restart and relaunch code out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pafooey Created 7 years, 6 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) 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 "chrome/browser/tab_contents/render_view_context_menu.h" 5 #include "chrome/browser/tab_contents/render_view_context_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
11 #include "apps/app_load_service.h"
11 #include "base/command_line.h" 12 #include "base/command_line.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
14 #include "base/prefs/pref_member.h" 15 #include "base/prefs/pref_member.h"
15 #include "base/prefs/pref_service.h" 16 #include "base/prefs/pref_service.h"
16 #include "base/stl_util.h" 17 #include "base/stl_util.h"
17 #include "base/string_util.h" 18 #include "base/string_util.h"
18 #include "base/time.h" 19 #include "base/time.h"
19 #include "base/utf_string_conversions.h" 20 #include "base/utf_string_conversions.h"
20 #include "chrome/app/chrome_command_ids.h" 21 #include "chrome/app/chrome_command_ids.h"
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 extensions::ExtensionSystem::Get(profile_)->extension_service()-> 1689 extensions::ExtensionSystem::Get(profile_)->extension_service()->
1689 ReloadExtension(platform_app->id()); 1690 ReloadExtension(platform_app->id());
1690 break; 1691 break;
1691 } 1692 }
1692 1693
1693 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: { 1694 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: {
1694 const Extension* platform_app = GetExtension(); 1695 const Extension* platform_app = GetExtension();
1695 DCHECK(platform_app); 1696 DCHECK(platform_app);
1696 DCHECK(platform_app->is_platform_app()); 1697 DCHECK(platform_app->is_platform_app());
1697 1698
1698 extensions::ExtensionSystem::Get(profile_)->extension_service()-> 1699 apps::AppLoadService::Get(profile_)->RestartApplication(
1699 RestartExtension(platform_app->id()); 1700 platform_app->id());
1700 break; 1701 break;
1701 } 1702 }
1702 1703
1703 case IDC_PRINT: 1704 case IDC_PRINT:
1704 if (params_.media_type == WebContextMenuData::MediaTypeNone) { 1705 if (params_.media_type == WebContextMenuData::MediaTypeNone) {
1705 printing::PrintViewManager* print_view_manager = 1706 printing::PrintViewManager* print_view_manager =
1706 printing::PrintViewManager::FromWebContents(source_web_contents_); 1707 printing::PrintViewManager::FromWebContents(source_web_contents_);
1707 if (!print_view_manager) 1708 if (!print_view_manager)
1708 break; 1709 break;
1709 if (profile_->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { 1710 if (profile_->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 source_web_contents_->GetRenderViewHost()-> 2039 source_web_contents_->GetRenderViewHost()->
2039 ExecuteMediaPlayerActionAtLocation(location, action); 2040 ExecuteMediaPlayerActionAtLocation(location, action);
2040 } 2041 }
2041 2042
2042 void RenderViewContextMenu::PluginActionAt( 2043 void RenderViewContextMenu::PluginActionAt(
2043 const gfx::Point& location, 2044 const gfx::Point& location,
2044 const WebPluginAction& action) { 2045 const WebPluginAction& action) {
2045 source_web_contents_->GetRenderViewHost()-> 2046 source_web_contents_->GetRenderViewHost()->
2046 ExecutePluginActionAtLocation(location, action); 2047 ExecutePluginActionAtLocation(location, action);
2047 } 2048 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698