| OLD | NEW |
| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 private: | 189 private: |
| 190 void OnActivateDesktop(const base::FilePath& shortcut, bool ash_exit) { | 190 void OnActivateDesktop(const base::FilePath& shortcut, bool ash_exit) { |
| 191 ui_proxy_->PostTask(FROM_HERE, | 191 ui_proxy_->PostTask(FROM_HERE, |
| 192 base::Bind(&ChromeAppViewAsh::OnActivateDesktop, | 192 base::Bind(&ChromeAppViewAsh::OnActivateDesktop, |
| 193 base::Unretained(app_view_), | 193 base::Unretained(app_view_), |
| 194 shortcut, ash_exit)); | 194 shortcut, ash_exit)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void OnOpenURLOnDesktop(const base::FilePath& shortcut, | 197 void OnOpenURLOnDesktop(const base::FilePath& shortcut, |
| 198 const string16& url) { | 198 const base::string16& url) { |
| 199 ui_proxy_->PostTask(FROM_HERE, | 199 ui_proxy_->PostTask(FROM_HERE, |
| 200 base::Bind(&ChromeAppViewAsh::OnOpenURLOnDesktop, | 200 base::Bind(&ChromeAppViewAsh::OnOpenURLOnDesktop, |
| 201 base::Unretained(app_view_), | 201 base::Unretained(app_view_), |
| 202 shortcut, url)); | 202 shortcut, url)); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void OnSetCursor(int64 cursor) { | 205 void OnSetCursor(int64 cursor) { |
| 206 ui_proxy_->PostTask(FROM_HERE, | 206 ui_proxy_->PostTask(FROM_HERE, |
| 207 base::Bind(&ChromeAppViewAsh::OnSetCursor, | 207 base::Bind(&ChromeAppViewAsh::OnSetCursor, |
| 208 base::Unretained(app_view_), | 208 base::Unretained(app_view_), |
| 209 reinterpret_cast<HCURSOR>(cursor))); | 209 reinterpret_cast<HCURSOR>(cursor))); |
| 210 } | 210 } |
| 211 | 211 |
| 212 void OnDisplayFileOpenDialog(const string16& title, | 212 void OnDisplayFileOpenDialog(const base::string16& title, |
| 213 const string16& filter, | 213 const base::string16& filter, |
| 214 const base::FilePath& default_path, | 214 const base::FilePath& default_path, |
| 215 bool allow_multiple_files) { | 215 bool allow_multiple_files) { |
| 216 ui_proxy_->PostTask(FROM_HERE, | 216 ui_proxy_->PostTask(FROM_HERE, |
| 217 base::Bind(&ChromeAppViewAsh::OnDisplayFileOpenDialog, | 217 base::Bind(&ChromeAppViewAsh::OnDisplayFileOpenDialog, |
| 218 base::Unretained(app_view_), | 218 base::Unretained(app_view_), |
| 219 title, | 219 title, |
| 220 filter, | 220 filter, |
| 221 default_path, | 221 default_path, |
| 222 allow_multiple_files)); | 222 allow_multiple_files)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void OnDisplayFileSaveAsDialog( | 225 void OnDisplayFileSaveAsDialog( |
| 226 const MetroViewerHostMsg_SaveAsDialogParams& params) { | 226 const MetroViewerHostMsg_SaveAsDialogParams& params) { |
| 227 ui_proxy_->PostTask( | 227 ui_proxy_->PostTask( |
| 228 FROM_HERE, | 228 FROM_HERE, |
| 229 base::Bind(&ChromeAppViewAsh::OnDisplayFileSaveAsDialog, | 229 base::Bind(&ChromeAppViewAsh::OnDisplayFileSaveAsDialog, |
| 230 base::Unretained(app_view_), | 230 base::Unretained(app_view_), |
| 231 params)); | 231 params)); |
| 232 } | 232 } |
| 233 | 233 |
| 234 void OnDisplayFolderPicker(const string16& title) { | 234 void OnDisplayFolderPicker(const base::string16& title) { |
| 235 ui_proxy_->PostTask( | 235 ui_proxy_->PostTask( |
| 236 FROM_HERE, | 236 FROM_HERE, |
| 237 base::Bind(&ChromeAppViewAsh::OnDisplayFolderPicker, | 237 base::Bind(&ChromeAppViewAsh::OnDisplayFolderPicker, |
| 238 base::Unretained(app_view_), | 238 base::Unretained(app_view_), |
| 239 title)); | 239 title)); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void OnSetCursorPos(int x, int y) { | 242 void OnSetCursorPos(int x, int y) { |
| 243 VLOG(1) << "In IPC OnSetCursorPos: " << x << ", " << y; | 243 VLOG(1) << "In IPC OnSetCursorPos: " << x << ", " << y; |
| 244 ui_proxy_->PostTask( | 244 ui_proxy_->PostTask( |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 DVLOG(1) << __FUNCTION__ << ", activation_kind=" << activation_kind; | 320 DVLOG(1) << __FUNCTION__ << ", activation_kind=" << activation_kind; |
| 321 | 321 |
| 322 if (activation_kind == winapp::Activation::ActivationKind_Launch) { | 322 if (activation_kind == winapp::Activation::ActivationKind_Launch) { |
| 323 mswr::ComPtr<winapp::Activation::ILaunchActivatedEventArgs> launch_args; | 323 mswr::ComPtr<winapp::Activation::ILaunchActivatedEventArgs> launch_args; |
| 324 if (args->QueryInterface( | 324 if (args->QueryInterface( |
| 325 winapp::Activation::IID_ILaunchActivatedEventArgs, | 325 winapp::Activation::IID_ILaunchActivatedEventArgs, |
| 326 &launch_args) == S_OK) { | 326 &launch_args) == S_OK) { |
| 327 DVLOG(1) << "Activate: ActivationKind_Launch"; | 327 DVLOG(1) << "Activate: ActivationKind_Launch"; |
| 328 mswrw::HString launch_args_str; | 328 mswrw::HString launch_args_str; |
| 329 launch_args->get_Arguments(launch_args_str.GetAddressOf()); | 329 launch_args->get_Arguments(launch_args_str.GetAddressOf()); |
| 330 string16 actual_launch_args(MakeStdWString(launch_args_str.Get())); | 330 base::string16 actual_launch_args( |
| 331 MakeStdWString(launch_args_str.Get())); |
| 331 if (actual_launch_args == win8::kMetroViewerConnectVerb) { | 332 if (actual_launch_args == win8::kMetroViewerConnectVerb) { |
| 332 DVLOG(1) << __FUNCTION__ << "Not launching chrome server"; | 333 DVLOG(1) << __FUNCTION__ << "Not launching chrome server"; |
| 333 return true; | 334 return true; |
| 334 } | 335 } |
| 335 } | 336 } |
| 336 } | 337 } |
| 337 } | 338 } |
| 338 | 339 |
| 339 DVLOG(1) << "Launching chrome server"; | 340 DVLOG(1) << "Launching chrome server"; |
| 340 base::FilePath chrome_exe_path; | 341 base::FilePath chrome_exe_path; |
| 341 | 342 |
| 342 if (!PathService::Get(base::FILE_EXE, &chrome_exe_path)) | 343 if (!PathService::Get(base::FILE_EXE, &chrome_exe_path)) |
| 343 return false; | 344 return false; |
| 344 | 345 |
| 345 string16 parameters = L"--silent-launch --viewer-connect "; | 346 base::string16 parameters = L"--silent-launch --viewer-connect "; |
| 346 if (additional_parameters) | 347 if (additional_parameters) |
| 347 parameters += additional_parameters; | 348 parameters += additional_parameters; |
| 348 | 349 |
| 349 SHELLEXECUTEINFO sei = { sizeof(sei) }; | 350 SHELLEXECUTEINFO sei = { sizeof(sei) }; |
| 350 sei.nShow = SW_SHOWNORMAL; | 351 sei.nShow = SW_SHOWNORMAL; |
| 351 sei.lpFile = chrome_exe_path.value().c_str(); | 352 sei.lpFile = chrome_exe_path.value().c_str(); |
| 352 sei.lpDirectory = L""; | 353 sei.lpDirectory = L""; |
| 353 sei.lpParameters = parameters.c_str(); | 354 sei.lpParameters = parameters.c_str(); |
| 354 ::ShellExecuteEx(&sei); | 355 ::ShellExecuteEx(&sei); |
| 355 return true; | 356 return true; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 if (!ash_exit) { | 752 if (!ash_exit) { |
| 752 ::TerminateProcess(sei.hProcess, 0); | 753 ::TerminateProcess(sei.hProcess, 0); |
| 753 ::CloseHandle(sei.hProcess); | 754 ::CloseHandle(sei.hProcess); |
| 754 } | 755 } |
| 755 | 756 |
| 756 if (ash_exit) | 757 if (ash_exit) |
| 757 ui_channel_->Close(); | 758 ui_channel_->Close(); |
| 758 } | 759 } |
| 759 | 760 |
| 760 void ChromeAppViewAsh::OnOpenURLOnDesktop(const base::FilePath& shortcut, | 761 void ChromeAppViewAsh::OnOpenURLOnDesktop(const base::FilePath& shortcut, |
| 761 const string16& url) { | 762 const base::string16& url) { |
| 762 base::FilePath::StringType file = shortcut.value(); | 763 base::FilePath::StringType file = shortcut.value(); |
| 763 SHELLEXECUTEINFO sei = { sizeof(sei) }; | 764 SHELLEXECUTEINFO sei = { sizeof(sei) }; |
| 764 sei.fMask = SEE_MASK_FLAG_LOG_USAGE; | 765 sei.fMask = SEE_MASK_FLAG_LOG_USAGE; |
| 765 sei.nShow = SW_SHOWNORMAL; | 766 sei.nShow = SW_SHOWNORMAL; |
| 766 sei.lpFile = file.c_str(); | 767 sei.lpFile = file.c_str(); |
| 767 sei.lpDirectory = L""; | 768 sei.lpDirectory = L""; |
| 768 sei.lpParameters = url.c_str(); | 769 sei.lpParameters = url.c_str(); |
| 769 BOOL result = ShellExecuteEx(&sei); | 770 BOOL result = ShellExecuteEx(&sei); |
| 770 } | 771 } |
| 771 | 772 |
| 772 void ChromeAppViewAsh::OnSetCursor(HCURSOR cursor) { | 773 void ChromeAppViewAsh::OnSetCursor(HCURSOR cursor) { |
| 773 ::SetCursor(HCURSOR(cursor)); | 774 ::SetCursor(HCURSOR(cursor)); |
| 774 } | 775 } |
| 775 | 776 |
| 776 void ChromeAppViewAsh::OnDisplayFileOpenDialog( | 777 void ChromeAppViewAsh::OnDisplayFileOpenDialog( |
| 777 const string16& title, | 778 const base::string16& title, |
| 778 const string16& filter, | 779 const base::string16& filter, |
| 779 const base::FilePath& default_path, | 780 const base::FilePath& default_path, |
| 780 bool allow_multiple_files) { | 781 bool allow_multiple_files) { |
| 781 DVLOG(1) << __FUNCTION__; | 782 DVLOG(1) << __FUNCTION__; |
| 782 | 783 |
| 783 // The OpenFilePickerSession instance is deleted when we receive a | 784 // The OpenFilePickerSession instance is deleted when we receive a |
| 784 // callback from the OpenFilePickerSession class about the completion of the | 785 // callback from the OpenFilePickerSession class about the completion of the |
| 785 // operation. | 786 // operation. |
| 786 FilePickerSessionBase* file_picker_ = | 787 FilePickerSessionBase* file_picker_ = |
| 787 new OpenFilePickerSession(this, | 788 new OpenFilePickerSession(this, |
| 788 title, | 789 title, |
| 789 filter, | 790 filter, |
| 790 default_path, | 791 default_path, |
| 791 allow_multiple_files); | 792 allow_multiple_files); |
| 792 file_picker_->Run(); | 793 file_picker_->Run(); |
| 793 } | 794 } |
| 794 | 795 |
| 795 void ChromeAppViewAsh::OnDisplayFileSaveAsDialog( | 796 void ChromeAppViewAsh::OnDisplayFileSaveAsDialog( |
| 796 const MetroViewerHostMsg_SaveAsDialogParams& params) { | 797 const MetroViewerHostMsg_SaveAsDialogParams& params) { |
| 797 DVLOG(1) << __FUNCTION__; | 798 DVLOG(1) << __FUNCTION__; |
| 798 | 799 |
| 799 // The SaveFilePickerSession instance is deleted when we receive a | 800 // The SaveFilePickerSession instance is deleted when we receive a |
| 800 // callback from the SaveFilePickerSession class about the completion of the | 801 // callback from the SaveFilePickerSession class about the completion of the |
| 801 // operation. | 802 // operation. |
| 802 FilePickerSessionBase* file_picker_ = | 803 FilePickerSessionBase* file_picker_ = |
| 803 new SaveFilePickerSession(this, params); | 804 new SaveFilePickerSession(this, params); |
| 804 file_picker_->Run(); | 805 file_picker_->Run(); |
| 805 } | 806 } |
| 806 | 807 |
| 807 void ChromeAppViewAsh::OnDisplayFolderPicker(const string16& title) { | 808 void ChromeAppViewAsh::OnDisplayFolderPicker(const base::string16& title) { |
| 808 DVLOG(1) << __FUNCTION__; | 809 DVLOG(1) << __FUNCTION__; |
| 809 // The FolderPickerSession instance is deleted when we receive a | 810 // The FolderPickerSession instance is deleted when we receive a |
| 810 // callback from the FolderPickerSession class about the completion of the | 811 // callback from the FolderPickerSession class about the completion of the |
| 811 // operation. | 812 // operation. |
| 812 FilePickerSessionBase* file_picker_ = new FolderPickerSession(this, title); | 813 FilePickerSessionBase* file_picker_ = new FolderPickerSession(this, title); |
| 813 file_picker_->Run(); | 814 file_picker_->Run(); |
| 814 } | 815 } |
| 815 | 816 |
| 816 void ChromeAppViewAsh::OnSetCursorPos(int x, int y) { | 817 void ChromeAppViewAsh::OnSetCursorPos(int x, int y) { |
| 817 if (ui_channel_) { | 818 if (ui_channel_) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 bool is_ime = false; | 913 bool is_ime = false; |
| 913 if (!input_source_->GetActiveSource(&langid, &is_ime)) { | 914 if (!input_source_->GetActiveSource(&langid, &is_ime)) { |
| 914 LOG(ERROR) << "GetActiveSource failed"; | 915 LOG(ERROR) << "GetActiveSource failed"; |
| 915 return; | 916 return; |
| 916 } | 917 } |
| 917 ui_channel_->Send(new MetroViewerHostMsg_ImeInputSourceChanged(langid, | 918 ui_channel_->Send(new MetroViewerHostMsg_ImeInputSourceChanged(langid, |
| 918 is_ime)); | 919 is_ime)); |
| 919 } | 920 } |
| 920 | 921 |
| 921 void ChromeAppViewAsh::OnCompositionChanged( | 922 void ChromeAppViewAsh::OnCompositionChanged( |
| 922 const string16& text, | 923 const base::string16& text, |
| 923 int32 selection_start, | 924 int32 selection_start, |
| 924 int32 selection_end, | 925 int32 selection_end, |
| 925 const std::vector<metro_viewer::UnderlineInfo>& underlines) { | 926 const std::vector<metro_viewer::UnderlineInfo>& underlines) { |
| 926 ui_channel_->Send(new MetroViewerHostMsg_ImeCompositionChanged( | 927 ui_channel_->Send(new MetroViewerHostMsg_ImeCompositionChanged( |
| 927 text, selection_start, selection_end, underlines)); | 928 text, selection_start, selection_end, underlines)); |
| 928 } | 929 } |
| 929 | 930 |
| 930 void ChromeAppViewAsh::OnTextCommitted(const string16& text) { | 931 void ChromeAppViewAsh::OnTextCommitted(const base::string16& text) { |
| 931 ui_channel_->Send(new MetroViewerHostMsg_ImeTextCommitted(text)); | 932 ui_channel_->Send(new MetroViewerHostMsg_ImeTextCommitted(text)); |
| 932 } | 933 } |
| 933 | 934 |
| 934 void ChromeAppViewAsh::SendMouseButton(int x, | 935 void ChromeAppViewAsh::SendMouseButton(int x, |
| 935 int y, | 936 int y, |
| 936 int extra, | 937 int extra, |
| 937 ui::EventType event_type, | 938 ui::EventType event_type, |
| 938 uint32 flags, | 939 uint32 flags, |
| 939 ui::EventFlags changed_button) { | 940 ui::EventFlags changed_button) { |
| 940 MetroViewerHostMsg_MouseButtonParams params; | 941 MetroViewerHostMsg_MouseButtonParams params; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 CheckHR(args->QueryInterface( | 1224 CheckHR(args->QueryInterface( |
| 1224 winapp::Activation::IID_ISearchActivatedEventArgs, &search_args)); | 1225 winapp::Activation::IID_ISearchActivatedEventArgs, &search_args)); |
| 1225 | 1226 |
| 1226 if (!ui_channel_) { | 1227 if (!ui_channel_) { |
| 1227 DVLOG(1) << "Launched to handle search request"; | 1228 DVLOG(1) << "Launched to handle search request"; |
| 1228 LaunchChromeBrowserProcess(L"--windows8-search", args); | 1229 LaunchChromeBrowserProcess(L"--windows8-search", args); |
| 1229 } | 1230 } |
| 1230 | 1231 |
| 1231 mswrw::HString search_string; | 1232 mswrw::HString search_string; |
| 1232 CheckHR(search_args->get_QueryText(search_string.GetAddressOf())); | 1233 CheckHR(search_args->get_QueryText(search_string.GetAddressOf())); |
| 1233 string16 search_text(MakeStdWString(search_string.Get())); | 1234 base::string16 search_text(MakeStdWString(search_string.Get())); |
| 1234 | 1235 |
| 1235 ui_loop_.PostTask(FROM_HERE, | 1236 ui_loop_.PostTask(FROM_HERE, |
| 1236 base::Bind(&ChromeAppViewAsh::OnSearchRequest, | 1237 base::Bind(&ChromeAppViewAsh::OnSearchRequest, |
| 1237 base::Unretained(this), | 1238 base::Unretained(this), |
| 1238 search_text)); | 1239 search_text)); |
| 1239 return S_OK; | 1240 return S_OK; |
| 1240 } | 1241 } |
| 1241 | 1242 |
| 1242 HRESULT ChromeAppViewAsh::HandleProtocolRequest( | 1243 HRESULT ChromeAppViewAsh::HandleProtocolRequest( |
| 1243 winapp::Activation::IActivatedEventArgs* args) { | 1244 winapp::Activation::IActivatedEventArgs* args) { |
| 1244 DVLOG(1) << __FUNCTION__; | 1245 DVLOG(1) << __FUNCTION__; |
| 1245 if (!ui_channel_) | 1246 if (!ui_channel_) |
| 1246 DVLOG(1) << "Launched to handle url request"; | 1247 DVLOG(1) << "Launched to handle url request"; |
| 1247 | 1248 |
| 1248 mswr::ComPtr<winapp::Activation::IProtocolActivatedEventArgs> | 1249 mswr::ComPtr<winapp::Activation::IProtocolActivatedEventArgs> |
| 1249 protocol_args; | 1250 protocol_args; |
| 1250 CheckHR(args->QueryInterface( | 1251 CheckHR(args->QueryInterface( |
| 1251 winapp::Activation::IID_IProtocolActivatedEventArgs, | 1252 winapp::Activation::IID_IProtocolActivatedEventArgs, |
| 1252 &protocol_args)); | 1253 &protocol_args)); |
| 1253 | 1254 |
| 1254 mswr::ComPtr<winfoundtn::IUriRuntimeClass> uri; | 1255 mswr::ComPtr<winfoundtn::IUriRuntimeClass> uri; |
| 1255 protocol_args->get_Uri(&uri); | 1256 protocol_args->get_Uri(&uri); |
| 1256 mswrw::HString url; | 1257 mswrw::HString url; |
| 1257 uri->get_AbsoluteUri(url.GetAddressOf()); | 1258 uri->get_AbsoluteUri(url.GetAddressOf()); |
| 1258 string16 actual_url(MakeStdWString(url.Get())); | 1259 base::string16 actual_url(MakeStdWString(url.Get())); |
| 1259 DVLOG(1) << "Received url request: " << actual_url; | 1260 DVLOG(1) << "Received url request: " << actual_url; |
| 1260 | 1261 |
| 1261 ui_loop_.PostTask(FROM_HERE, | 1262 ui_loop_.PostTask(FROM_HERE, |
| 1262 base::Bind(&ChromeAppViewAsh::OnNavigateToUrl, | 1263 base::Bind(&ChromeAppViewAsh::OnNavigateToUrl, |
| 1263 base::Unretained(this), | 1264 base::Unretained(this), |
| 1264 actual_url)); | 1265 actual_url)); |
| 1265 return S_OK; | 1266 return S_OK; |
| 1266 } | 1267 } |
| 1267 | 1268 |
| 1268 HRESULT ChromeAppViewAsh::OnEdgeGestureCompleted( | 1269 HRESULT ChromeAppViewAsh::OnEdgeGestureCompleted( |
| 1269 winui::Input::IEdgeGesture* gesture, | 1270 winui::Input::IEdgeGesture* gesture, |
| 1270 winui::Input::IEdgeGestureEventArgs* args) { | 1271 winui::Input::IEdgeGestureEventArgs* args) { |
| 1271 // Swipe from edge gesture (and win+z) is equivalent to pressing F11. | 1272 // Swipe from edge gesture (and win+z) is equivalent to pressing F11. |
| 1272 // TODO(cpu): Make this cleaner for m33. | 1273 // TODO(cpu): Make this cleaner for m33. |
| 1273 ui_channel_->Send(new MetroViewerHostMsg_KeyDown(VK_F11, 1, 0, 0)); | 1274 ui_channel_->Send(new MetroViewerHostMsg_KeyDown(VK_F11, 1, 0, 0)); |
| 1274 ::Sleep(15); | 1275 ::Sleep(15); |
| 1275 ui_channel_->Send(new MetroViewerHostMsg_KeyUp(VK_F11, 1, 0, 0)); | 1276 ui_channel_->Send(new MetroViewerHostMsg_KeyUp(VK_F11, 1, 0, 0)); |
| 1276 return S_OK; | 1277 return S_OK; |
| 1277 } | 1278 } |
| 1278 | 1279 |
| 1279 void ChromeAppViewAsh::OnSearchRequest(const string16& search_string) { | 1280 void ChromeAppViewAsh::OnSearchRequest(const base::string16& search_string) { |
| 1280 DCHECK(ui_channel_); | 1281 DCHECK(ui_channel_); |
| 1281 ui_channel_->Send(new MetroViewerHostMsg_SearchRequest(search_string)); | 1282 ui_channel_->Send(new MetroViewerHostMsg_SearchRequest(search_string)); |
| 1282 } | 1283 } |
| 1283 | 1284 |
| 1284 void ChromeAppViewAsh::OnNavigateToUrl(const string16& url) { | 1285 void ChromeAppViewAsh::OnNavigateToUrl(const base::string16& url) { |
| 1285 DCHECK(ui_channel_); | 1286 DCHECK(ui_channel_); |
| 1286 ui_channel_->Send(new MetroViewerHostMsg_OpenURL(url)); | 1287 ui_channel_->Send(new MetroViewerHostMsg_OpenURL(url)); |
| 1287 } | 1288 } |
| 1288 | 1289 |
| 1289 HRESULT ChromeAppViewAsh::OnSizeChanged(winui::Core::ICoreWindow* sender, | 1290 HRESULT ChromeAppViewAsh::OnSizeChanged(winui::Core::ICoreWindow* sender, |
| 1290 winui::Core::IWindowSizeChangedEventArgs* args) { | 1291 winui::Core::IWindowSizeChangedEventArgs* args) { |
| 1291 if (!window_) { | 1292 if (!window_) { |
| 1292 return S_OK; | 1293 return S_OK; |
| 1293 } | 1294 } |
| 1294 | 1295 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1315 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; | 1316 mswr::ComPtr<winapp::Core::ICoreApplicationExit> app_exit; |
| 1316 CheckHR(core_app.As(&app_exit)); | 1317 CheckHR(core_app.As(&app_exit)); |
| 1317 globals.app_exit = app_exit.Detach(); | 1318 globals.app_exit = app_exit.Detach(); |
| 1318 } | 1319 } |
| 1319 | 1320 |
| 1320 IFACEMETHODIMP | 1321 IFACEMETHODIMP |
| 1321 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { | 1322 ChromeAppViewFactory::CreateView(winapp::Core::IFrameworkView** view) { |
| 1322 *view = mswr::Make<ChromeAppViewAsh>().Detach(); | 1323 *view = mswr::Make<ChromeAppViewAsh>().Detach(); |
| 1323 return (*view) ? S_OK : E_OUTOFMEMORY; | 1324 return (*view) ? S_OK : E_OUTOFMEMORY; |
| 1324 } | 1325 } |
| OLD | NEW |