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

Unified Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 546503002: Notify the Chrome browser process about the window being activated from the viewer process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back a comment which was removed by mistake Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: win8/metro_driver/chrome_app_view_ash.cc
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc
index 98e52b375f62aa33182906a991d8c84783cd0980..8bcc6dbdab67a56f657ee666f8e0a1b9967d9ba6 100644
--- a/win8/metro_driver/chrome_app_view_ash.cc
+++ b/win8/metro_driver/chrome_app_view_ash.cc
@@ -1280,18 +1280,23 @@ HRESULT ChromeAppViewAsh::OnCharacterReceived(
HRESULT ChromeAppViewAsh::OnWindowActivated(
winui::Core::ICoreWindow* sender,
winui::Core::IWindowActivatedEventArgs* args) {
- winui::Core::CoreWindowActivationState state;
- HRESULT hr = args->get_WindowActivationState(&state);
- if (FAILED(hr))
- return hr;
+ if (args) {
+ winui::Core::CoreWindowActivationState state;
+ HRESULT hr = args->get_WindowActivationState(&state);
+ if (FAILED(hr))
+ return hr;
- // Treat both full activation (Ash was reopened from the Start Screen or from
- // any other Metro entry point in Windows) and pointer activation (user
- // clicked back in Ash after using another app on another monitor) the same.
- if (state == winui::Core::CoreWindowActivationState_CodeActivated ||
- state == winui::Core::CoreWindowActivationState_PointerActivated) {
- if (text_service_)
- text_service_->OnWindowActivated();
+ // Treat both full activation (Ash was reopened from the Start Screen or
+ // from any other Metro entry point in Windows) and pointer activation
+ // (user clicked back in Ash after using another app on another monitor)
+ // the same.
+ if (state == winui::Core::CoreWindowActivationState_CodeActivated ||
+ state == winui::Core::CoreWindowActivationState_PointerActivated) {
+ if (text_service_)
+ text_service_->OnWindowActivated();
+ ui_channel_->Send(new MetroViewerHostMsg_WindowActivated());
+ }
+ } else {
cpu_(ooo_6.6-7.5) 2014/09/04 19:13:21 // On windows 7 we need to force a redraw after th
ananta 2014/09/04 19:27:07 Added a comment. We also pass in a bool in the IPC
ui_channel_->Send(new MetroViewerHostMsg_WindowActivated());
}
return S_OK;

Powered by Google App Engine
This is Rietveld 408576698