Description[win8] Force browsers created while Chrome is in Metro mode to be on the Ash desktop.
When a user has configured Chrome to run in Metro mode, all browser
windows should open in the Ash desktop, regardless of where the request
came from. This includes browser desktop shortcuts, v1 browser-hosted
apps, OAuth windows, links from packaged apps, and DevTools windows.
Currently there are many code paths that result in a browser created in
Windows Desktop mode.
Also, if a browser is created in Ash, Metro mode does not always
activate. This may cause a user to think no window was created.
This CL adds BrowserWindow::AdjustHostDesktopType(..) to represent the
current policy decision that browser windows should only open on the Ash
desktop on Windows, when Chrome is running in Metro mode.
The policy is enforced by ensuring all constructed Browser instances are
created with a verified host desktop, which will be TYPE_ASH whenever the
ash shell is instantiated on Windows.
Then, when a browser window gains focus in the Ash desktop, if the metro
viewer process is not already the foreground window, switch to Metro
mode.
BUG=315385, 315894, 319173
TEST=Have Chrome configured in Metro mode. Then:
1. Open Chrome via the Desktop mode App Launcher.
2. Open Chrome via the context menu on the Chrome icon on the Desktop
mode App Launcher.
3. Open Chrome with a profile-badged desktop shortcut (twice).
4. (in Metro Mode) open an undocked Inspector window.
5. Open a v1 hosted app (e.g. Drive) from the Desktop mode app launcher.
6. After showing the Desktop app launcher and closing it, open a v1
hosted app desktop shortcut
===> All of these should open windows in Ash, and switch to Metro mode.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=235906
Patch Set 1 : #ifdef flavour #Patch Set 2 : platform-specific browser_frame_ash_win #Patch Set 3 : Use WindowFocused, to catch creation of new tabs as well #Patch Set 4 : Bots do not seem to care, but try not to break non-CrOS Ash on Linux. Also fix typo. #
Total comments: 12
Patch Set 5 : respond to comments #
Total comments: 6
Patch Set 6 : Move from browser_commands to BrowserWindow #Messages
Total messages: 12 (0 generated)
|