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

Side by Side Diff: win8/metro_driver/chrome_app_view_ash.cc

Issue 646123002: Ensure that the TextServices object which implements IME for Windows 7/8 ASH gets window activation… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "win8/metro_driver/stdafx.h" 5 #include "win8/metro_driver/stdafx.h"
6 #include "win8/metro_driver/chrome_app_view_ash.h" 6 #include "win8/metro_driver/chrome_app_view_ash.h"
7 7
8 #include <corewindow.h> 8 #include <corewindow.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <windows.foundation.h> 10 #include <windows.foundation.h>
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 HRESULT hr = args->get_WindowActivationState(&state); 1296 HRESULT hr = args->get_WindowActivationState(&state);
1297 if (FAILED(hr)) 1297 if (FAILED(hr))
1298 return hr; 1298 return hr;
1299 1299
1300 // Treat both full activation (Ash was reopened from the Start Screen or 1300 // Treat both full activation (Ash was reopened from the Start Screen or
1301 // from any other Metro entry point in Windows) and pointer activation 1301 // from any other Metro entry point in Windows) and pointer activation
1302 // (user clicked back in Ash after using another app on another monitor) 1302 // (user clicked back in Ash after using another app on another monitor)
1303 // the same. 1303 // the same.
1304 if (state == winui::Core::CoreWindowActivationState_CodeActivated || 1304 if (state == winui::Core::CoreWindowActivationState_CodeActivated ||
1305 state == winui::Core::CoreWindowActivationState_PointerActivated) { 1305 state == winui::Core::CoreWindowActivationState_PointerActivated) {
1306 if (text_service_)
1307 text_service_->OnWindowActivated();
1308 ui_channel_->Send(new MetroViewerHostMsg_WindowActivated(false)); 1306 ui_channel_->Send(new MetroViewerHostMsg_WindowActivated(false));
1309 } 1307 }
1310 } else { 1308 } else {
1311 // On Windows 7, we force a repaint when the window is activated. 1309 // On Windows 7, we force a repaint when the window is activated.
1312 ui_channel_->Send(new MetroViewerHostMsg_WindowActivated(true)); 1310 ui_channel_->Send(new MetroViewerHostMsg_WindowActivated(true));
1313 } 1311 }
1312 if (text_service_)
1313 text_service_->OnWindowActivated();
1314 return S_OK; 1314 return S_OK;
1315 } 1315 }
1316 1316
1317 HRESULT ChromeAppViewAsh::HandleSearchRequest( 1317 HRESULT ChromeAppViewAsh::HandleSearchRequest(
1318 winapp::Activation::IActivatedEventArgs* args) { 1318 winapp::Activation::IActivatedEventArgs* args) {
1319 mswr::ComPtr<winapp::Activation::ISearchActivatedEventArgs> search_args; 1319 mswr::ComPtr<winapp::Activation::ISearchActivatedEventArgs> search_args;
1320 CheckHR(args->QueryInterface( 1320 CheckHR(args->QueryInterface(
1321 winapp::Activation::IID_ISearchActivatedEventArgs, &search_args)); 1321 winapp::Activation::IID_ISearchActivatedEventArgs, &search_args));
1322 1322
1323 if (!ui_channel_) { 1323 if (!ui_channel_) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; 1471 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit;
1472 CheckHR(core_app.As(&app_exit)); 1472 CheckHR(core_app.As(&app_exit));
1473 globals.app_exit = app_exit.Detach(); 1473 globals.app_exit = app_exit.Detach();
1474 } 1474 }
1475 1475
1476 IFACEMETHODIMP 1476 IFACEMETHODIMP
1477 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { 1477 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) {
1478 *view = mswr::Make<ChromeAppViewAsh>().Detach(); 1478 *view = mswr::Make<ChromeAppViewAsh>().Detach();
1479 return (*view) ? S_OK : E_OUTOFMEMORY; 1479 return (*view) ? S_OK : E_OUTOFMEMORY;
1480 } 1480 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698