summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metro_viewer
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 22:35:13 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 22:35:13 +0000
commite9613b5faae323d10b41d0693ea7be26cdc2de26 (patch)
treedb949a7e08f7996fab279e1d158a032aa1cfe02f /chrome/browser/metro_viewer
parente6f5a668f2ddc58f4107a419668ad36dcf517372 (diff)
downloadchromium_src-e9613b5faae323d10b41d0693ea7be26cdc2de26.zip
chromium_src-e9613b5faae323d10b41d0693ea7be26cdc2de26.tar.gz
chromium_src-e9613b5faae323d10b41d0693ea7be26cdc2de26.tar.bz2
Ensure that Metro chrome in ASH is able to connect to an existing desktop chrome AURA process.
To achieve this the following changes were made. 1. Moved the MetroViewerProcessHost instance from the ChromeBrowserMainPartsWin class to the BrowserProcessImpl class. 2. We instantiate the MetroViewerProcessHost class as needed, i.e. when the command line for the current browser process specifies that a metro viewer is being created and when a chrome browser process delegates to an existing desktop chrome browser process passing in the metro viewer command line. 3. The functionality to process a commmand line is provided by the new virtual function PlatformSpecificCommandLineProcessing which is invoked during startup and when a newly launched chrome browser process delegates to an already running instance. I also added a call to CloseAsh in the channel error handling in the MetroViewerProcessHost class, to ensure that subsequent launches of Chrome Ash in metro succeed. BUG=151718 R=sky Review URL: https://codereview.chromium.org/11299192 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metro_viewer')
-rw-r--r--chrome/browser/metro_viewer/metro_viewer_process_host_win.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/metro_viewer/metro_viewer_process_host_win.cc b/chrome/browser/metro_viewer/metro_viewer_process_host_win.cc
index a1b411e..647fca0 100644
--- a/chrome/browser/metro_viewer/metro_viewer_process_host_win.cc
+++ b/chrome/browser/metro_viewer/metro_viewer_process_host_win.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/metro_viewer/metro_viewer_process_host_win.h"
#include "base/logging.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/ui/ash/ash_init.h"
#include "content/public/browser/browser_thread.h"
@@ -15,6 +16,7 @@
MetroViewerProcessHost::MetroViewerProcessHost(
const std::string& ipc_channel_name) {
+ g_browser_process->AddRefModule();
channel_.reset(new IPC::ChannelProxy(
ipc_channel_name.c_str(),
IPC::Channel::MODE_NAMED_SERVER,
@@ -51,7 +53,8 @@ void MetroViewerProcessHost::OnChannelError() {
// TODO(cpu): At some point we only close the browser. Right now this
// is very convenient for developing.
DLOG(INFO) << "viewer channel error : Quitting browser";
- browser::CloseAllBrowsers();
+ g_browser_process->ReleaseModule();
+ chrome::CloseAsh();
}
void MetroViewerProcessHost::OnSetTargetSurface(