diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 23:22:14 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 23:22:14 +0000 |
commit | 0e875ac95811609c7c7b0220bcd3cef9a4e990f7 (patch) | |
tree | 4bf87d17d2e6dda4f6301bd6046821a361c76d60 /chrome/browser/metro_viewer | |
parent | ba03c8c05b52aa7e48a8235a9c26c765cbf5cf9e (diff) | |
download | chromium_src-0e875ac95811609c7c7b0220bcd3cef9a4e990f7.zip chromium_src-0e875ac95811609c7c7b0220bcd3cef9a4e990f7.tar.gz chromium_src-0e875ac95811609c7c7b0220bcd3cef9a4e990f7.tar.bz2 |
Open a browser tab when Ash on Windows is launched.
The current behavior is to launch ash with nothing open
so the user would need to click on the Chrome ash icon
to see the browser.
This change creates two new notification types which
we use to show the Ash browser window. It is done this
way to preserve symmetry with
chrome_shell_delegate_chromeos.cc
BUG=227247
TEST=open ash a window should be shown.
Review URL: https://chromiumcodereview.appspot.com/15021003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metro_viewer')
-rw-r--r-- | chrome/browser/metro_viewer/metro_viewer_process_host_win.cc | 13 |
1 files changed, 13 insertions, 0 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 806d29c..caf5984 100644 --- a/chrome/browser/metro_viewer/metro_viewer_process_host_win.cc +++ b/chrome/browser/metro_viewer/metro_viewer_process_host_win.cc @@ -12,7 +12,9 @@ #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/host_desktop.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" +#include "chrome/common/chrome_notification_types.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/web_contents.h" #include "ipc/ipc_channel_proxy.h" #include "ui/aura/remote_root_window_host_win.h" @@ -77,6 +79,12 @@ void MetroViewerProcessHost::OnChannelError() { g_browser_process->ReleaseModule(); CloseOpenAshBrowsers(); chrome::CloseAsh(); + // Tell the rest of Chrome about it. + content::NotificationService::current()->Notify( + chrome::NOTIFICATION_ASH_SESSION_ENDED, + content::NotificationService::AllSources(), + content::NotificationService::NoDetails()); + // This will delete the MetroViewerProcessHost object. Don't access member // variables/functions after this call. g_browser_process->OnMetroViewerProcessTerminated(); @@ -91,4 +99,9 @@ void MetroViewerProcessHost::OnSetTargetSurface( AcceleratedPresenter::GetForWindow(NULL); any_window->SetNewTargetWindow(hwnd); aura::RemoteRootWindowHostWin::Instance()->Connected(this); + // Tell the rest of Chrome that Ash is running. + content::NotificationService::current()->Notify( + chrome::NOTIFICATION_ASH_SESSION_STARTED, + content::NotificationService::AllSources(), + content::NotificationService::NoDetails()); } |