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

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

Issue 593353003: The metro_driver should not block the UI thread while waiting for the Chrome browser IPC channel to… (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
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 #ifndef WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ 5 #ifndef WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_
6 #define WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ 6 #define WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_
7 7
8 #include <windows.applicationmodel.core.h> 8 #include <windows.applicationmodel.core.h>
9 #include <windows.ui.core.h> 9 #include <windows.ui.core.h>
10 #include <windows.ui.input.h> 10 #include <windows.ui.input.h>
11 #include <windows.ui.viewmanagement.h> 11 #include <windows.ui.viewmanagement.h>
12 12
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/threading/thread.h"
16 #include "ui/events/event_constants.h" 17 #include "ui/events/event_constants.h"
17 #include "win8/metro_driver/direct3d_helper.h" 18 #include "win8/metro_driver/direct3d_helper.h"
18 #include "win8/metro_driver/ime/ime_popup_observer.h" 19 #include "win8/metro_driver/ime/ime_popup_observer.h"
19 #include "win8/metro_driver/ime/input_source_observer.h" 20 #include "win8/metro_driver/ime/input_source_observer.h"
20 #include "win8/metro_driver/ime/text_service_delegate.h" 21 #include "win8/metro_driver/ime/text_service_delegate.h"
21 22
22 namespace base { 23 namespace base {
23 class FilePath; 24 class FilePath;
24 } 25 }
25 26
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 winui::Input::IEdgeGestureEventArgs* args); 190 winui::Input::IEdgeGestureEventArgs* args);
190 191
191 // Tasks posted to the UI thread to initiate the search/url navigation 192 // Tasks posted to the UI thread to initiate the search/url navigation
192 // requests. 193 // requests.
193 void OnSearchRequest(const base::string16& search_string); 194 void OnSearchRequest(const base::string16& search_string);
194 void OnNavigateToUrl(const base::string16& url); 195 void OnNavigateToUrl(const base::string16& url);
195 196
196 HRESULT OnSizeChanged(winui::Core::ICoreWindow* sender, 197 HRESULT OnSizeChanged(winui::Core::ICoreWindow* sender,
197 winui::Core::IWindowSizeChangedEventArgs* args); 198 winui::Core::IWindowSizeChangedEventArgs* args);
198 199
200 // This function waits for the Chrome browser channel to be initialized.
201 // It then goes ahead and starts up the viewer in Chrome OS mode.
202 static void CALLBACK StartChromeOSMode(HWND core_window,
203 UINT message,
204 UINT_PTR timer_id,
205 DWORD time);
206
199 mswr::ComPtr<winui::Core::ICoreWindow> window_; 207 mswr::ComPtr<winui::Core::ICoreWindow> window_;
200 mswr::ComPtr<winapp::Core::ICoreApplicationView> view_; 208 mswr::ComPtr<winapp::Core::ICoreApplicationView> view_;
201 EventRegistrationToken activated_token_; 209 EventRegistrationToken activated_token_;
202 EventRegistrationToken pointermoved_token_; 210 EventRegistrationToken pointermoved_token_;
203 EventRegistrationToken pointerpressed_token_; 211 EventRegistrationToken pointerpressed_token_;
204 EventRegistrationToken pointerreleased_token_; 212 EventRegistrationToken pointerreleased_token_;
205 EventRegistrationToken wheel_token_; 213 EventRegistrationToken wheel_token_;
206 EventRegistrationToken keydown_token_; 214 EventRegistrationToken keydown_token_;
207 EventRegistrationToken keyup_token_; 215 EventRegistrationToken keyup_token_;
208 EventRegistrationToken character_received_token_; 216 EventRegistrationToken character_received_token_;
209 EventRegistrationToken accel_keydown_token_; 217 EventRegistrationToken accel_keydown_token_;
210 EventRegistrationToken accel_keyup_token_; 218 EventRegistrationToken accel_keyup_token_;
211 EventRegistrationToken window_activated_token_; 219 EventRegistrationToken window_activated_token_;
212 EventRegistrationToken sizechange_token_; 220 EventRegistrationToken sizechange_token_;
213 EventRegistrationToken edgeevent_token_; 221 EventRegistrationToken edgeevent_token_;
214 222
215 // Keep state about which button is currently down, if any, as PointerMoved 223 // Keep state about which button is currently down, if any, as PointerMoved
216 // events do not contain that state, but Ash's MouseEvents need it. Value is 224 // events do not contain that state, but Ash's MouseEvents need it. Value is
217 // as a bitmask of ui::EventFlags. 225 // as a bitmask of ui::EventFlags.
218 uint32 mouse_down_flags_; 226 uint32 mouse_down_flags_;
219 227
220 // Set the D3D swap chain and nothing else. 228 // Set the D3D swap chain and nothing else.
221 metro_driver::Direct3DHelper direct3d_helper_; 229 metro_driver::Direct3DHelper direct3d_helper_;
222 230
223 // The channel to Chrome, in particular to the MetroViewerProcessHost. 231 // The channel to Chrome, in particular to the MetroViewerProcessHost.
224 IPC::ChannelProxy* ui_channel_; 232 scoped_ptr<IPC::ChannelProxy> ui_channel_;
225 233
226 // The actual window behind the view surface. 234 // The actual window behind the view surface.
227 HWND core_window_hwnd_; 235 HWND core_window_hwnd_;
228 236
229 // UI message loop to allow message passing into this thread. 237 // UI message loop to allow message passing into this thread.
230 base::MessageLoopForUI ui_loop_; 238 base::MessageLoopForUI ui_loop_;
231 239
232 // For IME support. 240 // For IME support.
233 scoped_ptr<metro_driver::InputSource> input_source_; 241 scoped_ptr<metro_driver::InputSource> input_source_;
234 scoped_ptr<metro_driver::TextService> text_service_; 242 scoped_ptr<metro_driver::TextService> text_service_;
235 243
236 // The metro device scale factor as reported by the winrt interfaces. 244 // The metro device scale factor as reported by the winrt interfaces.
237 float metro_dpi_scale_; 245 float metro_dpi_scale_;
238 // The win32 dpi scale which is queried via GetDeviceCaps. Please refer to 246 // The win32 dpi scale which is queried via GetDeviceCaps. Please refer to
239 // ui/gfx/win/dpi.cc for more information. 247 // ui/gfx/win/dpi.cc for more information.
240 float win32_dpi_scale_; 248 float win32_dpi_scale_;
241 249
242 // The cursor set by the chroem browser process. 250 // The cursor set by the chroem browser process.
243 HCURSOR last_cursor_; 251 HCURSOR last_cursor_;
252
253 // The IPC channel IO thread.
254 scoped_ptr<base::Thread> io_thread_;
scottmg 2014/09/24 02:40:32 maybe move this above the ui_channel_ since it's s
ananta 2014/09/24 18:22:33 Done.
244 }; 255 };
245 256
246 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_ 257 #endif // WIN8_METRO_DRIVER_CHROME_APP_VIEW_ASH_H_
OLDNEW
« no previous file with comments | « no previous file | win8/metro_driver/chrome_app_view_ash.cc » ('j') | win8/metro_driver/chrome_app_view_ash.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698