| 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 #ifndef CHROME_BROWSER_UI_METRO_DRIVER_CHROME_APP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_METRO_DRIVER_CHROME_APP_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_METRO_DRIVER_CHROME_APP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_METRO_DRIVER_CHROME_APP_VIEW_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 <list> | 13 #include <list> |
| 14 #include <map> | 14 #include <map> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <utility> | 16 #include <utility> |
| 17 | 17 |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/message_loop.h" | 19 #include "base/message_loop.h" |
| 20 #include "base/synchronization/lock.h" | 20 #include "base/synchronization/lock.h" |
| 21 #include "win8/metro_driver/chrome_url_launch_handler.h" | 21 #include "win8/metro_driver/chrome_url_launch_handler.h" |
| 22 #include "win8/metro_driver/devices_handler.h" | 22 #include "win8/metro_driver/devices_handler.h" |
| 23 #include "win8/metro_driver/direct3d_helper.h" |
| 23 #include "win8/metro_driver/metro_dialog_box.h" | 24 #include "win8/metro_driver/metro_dialog_box.h" |
| 24 #include "win8/metro_driver/settings_handler.h" | 25 #include "win8/metro_driver/settings_handler.h" |
| 25 #include "win8/metro_driver/toast_notification_handler.h" | 26 #include "win8/metro_driver/toast_notification_handler.h" |
| 26 | 27 |
| 27 class ChromeAppView | 28 class ChromeAppView |
| 28 : public mswr::RuntimeClass<winapp::Core::IFrameworkView> { | 29 : public mswr::RuntimeClass<winapp::Core::IFrameworkView> { |
| 29 public: | 30 public: |
| 30 ChromeAppView(); | 31 ChromeAppView(); |
| 31 ~ChromeAppView(); | 32 ~ChromeAppView(); |
| 32 | 33 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 126 |
| 126 // Synchronizes access to the notification_map_ member. | 127 // Synchronizes access to the notification_map_ member. |
| 127 base::Lock notification_lock_; | 128 base::Lock notification_lock_; |
| 128 | 129 |
| 129 // If the OSK covers the input area we scroll the window by the height of the | 130 // If the OSK covers the input area we scroll the window by the height of the |
| 130 // OSK + an additional offset. This member holds this offset. Set to 0 if the | 131 // OSK + an additional offset. This member holds this offset. Set to 0 if the |
| 131 // window was not scrolled. | 132 // window was not scrolled. |
| 132 int osk_offset_adjustment_; | 133 int osk_offset_adjustment_; |
| 133 | 134 |
| 134 MetroDialogBox dialog_box_; | 135 MetroDialogBox dialog_box_; |
| 136 |
| 137 metro_driver::Direct3DHelper direct3d_helper_; |
| 135 }; | 138 }; |
| 136 | 139 |
| 137 class ChromeAppViewFactory | 140 class ChromeAppViewFactory |
| 138 : public mswr::RuntimeClass<winapp::Core::IFrameworkViewSource> { | 141 : public mswr::RuntimeClass<winapp::Core::IFrameworkViewSource> { |
| 139 public: | 142 public: |
| 140 ChromeAppViewFactory(winapp::Core::ICoreApplication* icore_app, | 143 ChromeAppViewFactory(winapp::Core::ICoreApplication* icore_app, |
| 141 LPTHREAD_START_ROUTINE host_main, | 144 LPTHREAD_START_ROUTINE host_main, |
| 142 void* host_context); | 145 void* host_context); |
| 143 IFACEMETHOD(CreateView)(winapp::Core::IFrameworkView** view); | 146 IFACEMETHOD(CreateView)(winapp::Core::IFrameworkView** view); |
| 144 }; | 147 }; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 168 // to be initiated from that thread, notably spawning file pickers. | 171 // to be initiated from that thread, notably spawning file pickers. |
| 169 base::MessageLoopProxy* appview_msg_loop; | 172 base::MessageLoopProxy* appview_msg_loop; |
| 170 winapp::Core::ICoreApplicationExit* app_exit; | 173 winapp::Core::ICoreApplicationExit* app_exit; |
| 171 BreakpadExceptionHandler breakpad_exception_handler; | 174 BreakpadExceptionHandler breakpad_exception_handler; |
| 172 string16 metro_command_line_switches; | 175 string16 metro_command_line_switches; |
| 173 }; | 176 }; |
| 174 | 177 |
| 175 extern Globals globals; | 178 extern Globals globals; |
| 176 | 179 |
| 177 #endif // CHROME_BROWSER_UI_METRO_DRIVER_CHROME_APP_VIEW_H_ | 180 #endif // CHROME_BROWSER_UI_METRO_DRIVER_CHROME_APP_VIEW_H_ |
| OLD | NEW |