| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser_process_platform_part_aurawin.h" | 5 #include "chrome/browser/browser_process_platform_part_aurawin.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { | 33 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { |
| 34 } | 34 } |
| 35 | 35 |
| 36 void BrowserProcessPlatformPart::OnMetroViewerProcessTerminated() { | 36 void BrowserProcessPlatformPart::OnMetroViewerProcessTerminated() { |
| 37 metro_viewer_process_host_.reset(NULL); | 37 metro_viewer_process_host_.reset(NULL); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing( | 40 void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing( |
| 41 const CommandLine& command_line) { | 41 const base::CommandLine& command_line) { |
| 42 // Check for Windows 8 specific commandlines requesting that this process | 42 // Check for Windows 8 specific commandlines requesting that this process |
| 43 // either connect to an existing viewer or launch a new viewer and | 43 // either connect to an existing viewer or launch a new viewer and |
| 44 // synchronously wait for it to connect. | 44 // synchronously wait for it to connect. |
| 45 | 45 |
| 46 bool launch = command_line.HasSwitch(switches::kViewerLaunchViaAppId); | 46 bool launch = command_line.HasSwitch(switches::kViewerLaunchViaAppId); |
| 47 bool connect = (launch || | 47 bool connect = (launch || |
| 48 (command_line.HasSwitch(switches::kViewerConnect) && | 48 (command_line.HasSwitch(switches::kViewerConnect) && |
| 49 !metro_viewer_process_host_.get())); | 49 !metro_viewer_process_host_.get())); |
| 50 if (!connect) | 50 if (!connect) |
| 51 return; | 51 return; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 75 if (mode == upgrade_util::RELAUNCH_MODE_DESKTOP) { | 75 if (mode == upgrade_util::RELAUNCH_MODE_DESKTOP) { |
| 76 // Metro -> Desktop | 76 // Metro -> Desktop |
| 77 chrome::ActivateDesktopHelper(chrome::ASH_TERMINATE); | 77 chrome::ActivateDesktopHelper(chrome::ASH_TERMINATE); |
| 78 } else { | 78 } else { |
| 79 // Metro -> Metro | 79 // Metro -> Metro |
| 80 ChromeMetroViewerProcessHost::HandleMetroExit(); | 80 ChromeMetroViewerProcessHost::HandleMetroExit(); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 } | 84 } |
| OLD | NEW |