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

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

Issue 583443005: Don't call ICoreWindow::Activate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 return S_OK; 670 return S_OK;
671 } 671 }
672 672
673 IFACEMETHODIMP 673 IFACEMETHODIMP
674 ChromeAppViewAsh::Run() { 674 ChromeAppViewAsh::Run() {
675 DVLOG(1) << __FUNCTION__; 675 DVLOG(1) << __FUNCTION__;
676 mswr::ComPtr<winui::Core::ICoreDispatcher> dispatcher; 676 mswr::ComPtr<winui::Core::ICoreDispatcher> dispatcher;
677 HRESULT hr = window_->get_Dispatcher(dispatcher.GetAddressOf()); 677 HRESULT hr = window_->get_Dispatcher(dispatcher.GetAddressOf());
678 CheckHR(hr, "Dispatcher failed."); 678 CheckHR(hr, "Dispatcher failed.");
679 679
680 hr = window_->Activate();
681 if (FAILED(hr)) {
682 DLOG(WARNING) << "activation failed hr=" << hr;
683 return hr;
684 }
685
686 // Create the IPC channel IO thread. It needs to out-live the ChannelProxy. 680 // Create the IPC channel IO thread. It needs to out-live the ChannelProxy.
687 base::Thread io_thread("metro_IO_thread"); 681 base::Thread io_thread("metro_IO_thread");
688 base::Thread::Options options; 682 base::Thread::Options options;
689 options.message_loop_type = base::MessageLoop::TYPE_IO; 683 options.message_loop_type = base::MessageLoop::TYPE_IO;
690 io_thread.StartWithOptions(options); 684 io_thread.StartWithOptions(options);
691 685
692 // Start up Chrome and wait for the desired IPC server connection to exist. 686 // Start up Chrome and wait for the desired IPC server connection to exist.
693 WaitForChromeIPCConnection(win8::kMetroViewerIPCChannelName); 687 WaitForChromeIPCConnection(win8::kMetroViewerIPCChannelName);
694 688
695 // In Aura mode we create an IPC channel to the browser, then ask it to 689 // In Aura mode we create an IPC channel to the browser, then ask it to
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; 1400 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit;
1407 CheckHR(core_app.As(&app_exit)); 1401 CheckHR(core_app.As(&app_exit));
1408 globals.app_exit = app_exit.Detach(); 1402 globals.app_exit = app_exit.Detach();
1409 } 1403 }
1410 1404
1411 IFACEMETHODIMP 1405 IFACEMETHODIMP
1412 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { 1406 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) {
1413 *view = mswr::Make<ChromeAppViewAsh>().Detach(); 1407 *view = mswr::Make<ChromeAppViewAsh>().Detach();
1414 return (*view) ? S_OK : E_OUTOFMEMORY; 1408 return (*view) ? S_OK : E_OUTOFMEMORY;
1415 } 1409 }
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