diff options
author | dcheng <dcheng@chromium.org> | 2015-04-29 14:54:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-29 21:56:05 +0000 |
commit | 04ae4f5ca488a6066efef98fd60d58f7f71040aa (patch) | |
tree | 8a25e9351847980cf5d9f1d044122b7a3c37ba48 | |
parent | c03f0524c44cc50189c3a29c20d74b4d84a252f3 (diff) | |
download | chromium_src-04ae4f5ca488a6066efef98fd60d58f7f71040aa.zip chromium_src-04ae4f5ca488a6066efef98fd60d58f7f71040aa.tar.gz chromium_src-04ae4f5ca488a6066efef98fd60d58f7f71040aa.tar.bz2 |
Apply automated fixits for Chrome clang plugin to win8.
Working on trimming down plugin warnings on the Windows clang build.
BUG=467287
TBR=ananta@chromium.org
Review URL: https://codereview.chromium.org/1117743002
Cr-Commit-Position: refs/heads/master@{#327588}
-rw-r--r-- | win8/delegate_execute/command_execute_impl.h | 24 | ||||
-rw-r--r-- | win8/metro_driver/chrome_app_view_ash.h | 10 | ||||
-rw-r--r-- | win8/metro_driver/file_picker_ash.cc | 33 | ||||
-rw-r--r-- | win8/metro_driver/metro_driver.h | 2 | ||||
-rw-r--r-- | win8/metro_driver/metro_driver_win7.cc | 300 | ||||
-rw-r--r-- | win8/test/test_registrar.cc | 2 | ||||
-rw-r--r-- | win8/test/ui_automation_client.cc | 2 |
7 files changed, 177 insertions, 196 deletions
diff --git a/win8/delegate_execute/command_execute_impl.h b/win8/delegate_execute/command_execute_impl.h index d2486d4..dd73ede 100644 --- a/win8/delegate_execute/command_execute_impl.h +++ b/win8/delegate_execute/command_execute_impl.h @@ -60,26 +60,26 @@ class ATL_NO_VTABLE DECLSPEC_UUID("071BB5F2-85A4-424F-BFE7-5F1609BE4C2C") public: // IExecuteCommand - STDMETHOD(SetKeyState)(DWORD key_state); - STDMETHOD(SetParameters)(LPCWSTR params); - STDMETHOD(SetPosition)(POINT pt); - STDMETHOD(SetShowWindow)(int show); - STDMETHOD(SetNoShowUI)(BOOL no_show_ui); - STDMETHOD(SetDirectory)(LPCWSTR directory); - STDMETHOD(Execute)(void); + STDMETHOD(SetKeyState)(DWORD key_state) override; + STDMETHOD(SetParameters)(LPCWSTR params) override; + STDMETHOD(SetPosition)(POINT pt) override; + STDMETHOD(SetShowWindow)(int show) override; + STDMETHOD(SetNoShowUI)(BOOL no_show_ui) override; + STDMETHOD(SetDirectory)(LPCWSTR directory) override; + STDMETHOD(Execute)(void)override; // IInitializeCommand - STDMETHOD(Initialize)(LPCWSTR name, IPropertyBag* bag); + STDMETHOD(Initialize)(LPCWSTR name, IPropertyBag * bag) override; // IObjectWithSelection - STDMETHOD(SetSelection)(IShellItemArray* item_array); - STDMETHOD(GetSelection)(REFIID riid, void** selection); + STDMETHOD(SetSelection)(IShellItemArray * item_array) override; + STDMETHOD(GetSelection)(REFIID riid, void** selection) override; // IExecuteCommandApplicationHostEnvironment - STDMETHOD(GetValue)(enum AHE_TYPE* pahe); + STDMETHOD(GetValue)(enum AHE_TYPE * pahe) override; // IForegroundTransfer - STDMETHOD(AllowForegroundTransfer)(void* reserved); + STDMETHOD(AllowForegroundTransfer)(void* reserved) override; static bool FindChromeExe(base::FilePath* chrome_exe); diff --git a/win8/metro_driver/chrome_app_view_ash.h b/win8/metro_driver/chrome_app_view_ash.h index 366f507..9fd7c29 100644 --- a/win8/metro_driver/chrome_app_view_ash.h +++ b/win8/metro_driver/chrome_app_view_ash.h @@ -62,11 +62,11 @@ class ChromeAppViewAsh ~ChromeAppViewAsh() override; // IViewProvider overrides. - IFACEMETHOD(Initialize)(winapp::Core::ICoreApplicationView* view); - IFACEMETHOD(SetWindow)(winui::Core::ICoreWindow* window); - IFACEMETHOD(Load)(HSTRING entryPoint); - IFACEMETHOD(Run)(); - IFACEMETHOD(Uninitialize)(); + IFACEMETHOD(Initialize)(winapp::Core::ICoreApplicationView* view) override; + IFACEMETHOD(SetWindow)(winui::Core::ICoreWindow* window) override; + IFACEMETHOD(Load)(HSTRING entryPoint) override; + IFACEMETHOD(Run)() override; + IFACEMETHOD(Uninitialize)() override; // Helper function to unsnap the chrome metro app if it is snapped. // Returns S_OK on success. diff --git a/win8/metro_driver/file_picker_ash.cc b/win8/metro_driver/file_picker_ash.cc index a270cb9..cc03b3c 100644 --- a/win8/metro_driver/file_picker_ash.cc +++ b/win8/metro_driver/file_picker_ash.cc @@ -23,7 +23,7 @@ typedef winfoundtn::Collections::IVector<HSTRING> StringVectorItf; // TODO(siggi): Complete this implementation and move it to a common place. class StringVectorImpl : public mswr::RuntimeClass<StringVectorItf> { public: - ~StringVectorImpl() { + ~StringVectorImpl() override { std::for_each(strings_.begin(), strings_.end(), ::WindowsDeleteString); } @@ -35,44 +35,35 @@ class StringVectorImpl : public mswr::RuntimeClass<StringVectorItf> { } // IVector<HSTRING> implementation. - STDMETHOD(GetAt)(unsigned index, HSTRING* item) { + STDMETHOD(GetAt)(unsigned index, HSTRING* item) override { if (index >= strings_.size()) return E_INVALIDARG; return ::WindowsDuplicateString(strings_[index], item); } - STDMETHOD(get_Size)(unsigned *size) { + STDMETHOD(get_Size)(unsigned* size) override { if (strings_.size() > UINT_MAX) return E_UNEXPECTED; *size = static_cast<unsigned>(strings_.size()); return S_OK; } - STDMETHOD(GetView)(winfoundtn::Collections::IVectorView<HSTRING> **view) { + STDMETHOD(GetView)( + winfoundtn::Collections::IVectorView<HSTRING>** view) override { return E_NOTIMPL; } - STDMETHOD(IndexOf)(HSTRING value, unsigned *index, boolean *found) { + STDMETHOD(IndexOf)(HSTRING value, unsigned* index, boolean* found) override { return E_NOTIMPL; } // write methods - STDMETHOD(SetAt)(unsigned index, HSTRING item) { - return E_NOTIMPL; - } - STDMETHOD(InsertAt)(unsigned index, HSTRING item) { - return E_NOTIMPL; - } - STDMETHOD(RemoveAt)(unsigned index) { - return E_NOTIMPL; - } - STDMETHOD(Append)(HSTRING item) { - return E_NOTIMPL; - } - STDMETHOD(RemoveAtEnd)() { - return E_NOTIMPL; - } - STDMETHOD(Clear)() { + STDMETHOD(SetAt)(unsigned index, HSTRING item) override { return E_NOTIMPL; } + STDMETHOD(InsertAt)(unsigned index, HSTRING item) override { return E_NOTIMPL; } + STDMETHOD(RemoveAt)(unsigned index) override { return E_NOTIMPL; } + STDMETHOD(Append)(HSTRING item) override { return E_NOTIMPL; } + STDMETHOD(RemoveAtEnd)() override { return E_NOTIMPL; } + STDMETHOD(Clear)() override { return E_NOTIMPL; } private: std::vector<HSTRING> strings_; diff --git a/win8/metro_driver/metro_driver.h b/win8/metro_driver/metro_driver.h index 2b7d548..da8f1c6 100644 --- a/win8/metro_driver/metro_driver.h +++ b/win8/metro_driver/metro_driver.h @@ -11,7 +11,7 @@ class ChromeAppViewFactory : public mswr::RuntimeClass<winapp::Core::IFrameworkViewSource> { public: ChromeAppViewFactory(winapp::Core::ICoreApplication* icore_app); - IFACEMETHOD(CreateView)(winapp::Core::IFrameworkView** view); + IFACEMETHOD(CreateView)(winapp::Core::IFrameworkView** view) override; }; #endif // WIN8_METRO_DRIVER_METRO_DRIVER_H_
\ No newline at end of file diff --git a/win8/metro_driver/metro_driver_win7.cc b/win8/metro_driver/metro_driver_win7.cc index 4dde00b..d34c1e0 100644 --- a/win8/metro_driver/metro_driver_win7.cc +++ b/win8/metro_driver/metro_driver_win7.cc @@ -126,30 +126,31 @@ class MouseEvent : public mswr::RuntimeClass< } // IPointerEventArgs implementation. - virtual HRESULT STDMETHODCALLTYPE get_CurrentPoint( - winui::Input::IPointerPoint** point) { + HRESULT STDMETHODCALLTYPE + get_CurrentPoint(winui::Input::IPointerPoint** point) override { return QueryInterface(winui::Input::IID_IPointerPoint, reinterpret_cast<void**>(point)); } - virtual HRESULT STDMETHODCALLTYPE get_KeyModifiers( - winsys::VirtualKeyModifiers* modifiers) { + HRESULT STDMETHODCALLTYPE + get_KeyModifiers(winsys::VirtualKeyModifiers* modifiers) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE GetIntermediatePoints( - winfoundtn::Collections::IVector<winui::Input::PointerPoint*>** points) { + HRESULT STDMETHODCALLTYPE GetIntermediatePoints( + winfoundtn::Collections::IVector<winui::Input::PointerPoint*>** points) + override { return E_NOTIMPL; } // IPointerPoint implementation. - virtual HRESULT STDMETHODCALLTYPE get_PointerDevice( - windevs::Input::IPointerDevice** pointer_device) { + HRESULT STDMETHODCALLTYPE + get_PointerDevice(windevs::Input::IPointerDevice** pointer_device) override { return QueryInterface(windevs::Input::IID_IPointerDevice, reinterpret_cast<void**>(pointer_device)); } - virtual HRESULT STDMETHODCALLTYPE get_Position(winfoundtn::Point* position) { + HRESULT STDMETHODCALLTYPE get_Position(winfoundtn::Point* position) override { static float scale = GetModernUIScale(); // Scale down the points here as they are scaled up on the other side. position->X = gfx::ToRoundedInt(CR_GET_X_LPARAM(msg_.lParam) / scale); @@ -157,40 +158,40 @@ class MouseEvent : public mswr::RuntimeClass< return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_PointerId(uint32* pointer_id) { + HRESULT STDMETHODCALLTYPE get_PointerId(uint32* pointer_id) override { // TODO(ananta) // Implement this properly. *pointer_id = 1; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_Timestamp(uint64* timestamp) { + HRESULT STDMETHODCALLTYPE get_Timestamp(uint64* timestamp) override { *timestamp = msg_.time; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_Properties( - winui::Input::IPointerPointProperties** properties) { + HRESULT STDMETHODCALLTYPE + get_Properties(winui::Input::IPointerPointProperties** properties) override { return QueryInterface(winui::Input::IID_IPointerPointProperties, reinterpret_cast<void**>(properties)); } - virtual HRESULT STDMETHODCALLTYPE get_RawPosition( - winfoundtn::Point* position) { + HRESULT STDMETHODCALLTYPE + get_RawPosition(winfoundtn::Point* position) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_FrameId(uint32* frame_id) { + HRESULT STDMETHODCALLTYPE get_FrameId(uint32* frame_id) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsInContact(boolean* in_contact) { + HRESULT STDMETHODCALLTYPE get_IsInContact(boolean* in_contact) override { return E_NOTIMPL; } // IPointerPointProperties implementation. - virtual HRESULT STDMETHODCALLTYPE get_PointerUpdateKind( - winui::Input::PointerUpdateKind* update_kind) { + HRESULT STDMETHODCALLTYPE + get_PointerUpdateKind(winui::Input::PointerUpdateKind* update_kind) override { // TODO(ananta) // There is no WM_POINTERUPDATE equivalent on Windows 7. Look into // equivalents. @@ -210,32 +211,32 @@ class MouseEvent : public mswr::RuntimeClass< return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsLeftButtonPressed( - boolean* left_button_pressed) { + HRESULT STDMETHODCALLTYPE + get_IsLeftButtonPressed(boolean* left_button_pressed) override { *left_button_pressed = msg_.wParam & MK_LBUTTON ? true : false; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsRightButtonPressed( - boolean* right_button_pressed) { + HRESULT STDMETHODCALLTYPE + get_IsRightButtonPressed(boolean* right_button_pressed) override { *right_button_pressed = msg_.wParam & MK_RBUTTON ? true : false; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsMiddleButtonPressed( - boolean* middle_button_pressed) { + HRESULT STDMETHODCALLTYPE + get_IsMiddleButtonPressed(boolean* middle_button_pressed) override { *middle_button_pressed = msg_.wParam & MK_MBUTTON ? true : false; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsHorizontalMouseWheel( - boolean* is_horizontal_mouse_wheel) { + HRESULT STDMETHODCALLTYPE + get_IsHorizontalMouseWheel(boolean* is_horizontal_mouse_wheel) override { *is_horizontal_mouse_wheel = (msg_.message == WM_MOUSEHWHEEL) ? true : false; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_MouseWheelDelta(int* delta) { + HRESULT STDMETHODCALLTYPE get_MouseWheelDelta(int* delta) override { if (msg_.message == WM_MOUSEWHEEL || msg_.message == WM_MOUSEHWHEEL) { *delta = GET_WHEEL_DELTA_WPARAM(msg_.wParam); return S_OK; @@ -244,88 +245,88 @@ class MouseEvent : public mswr::RuntimeClass< } } - virtual HRESULT STDMETHODCALLTYPE get_Pressure(float* pressure) { + HRESULT STDMETHODCALLTYPE get_Pressure(float* pressure) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsInverted(boolean* inverted) { + HRESULT STDMETHODCALLTYPE get_IsInverted(boolean* inverted) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsEraser(boolean* is_eraser) { + HRESULT STDMETHODCALLTYPE get_IsEraser(boolean* is_eraser) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_Orientation(float* orientation) { + HRESULT STDMETHODCALLTYPE get_Orientation(float* orientation) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_XTilt(float* x_tilt) { + HRESULT STDMETHODCALLTYPE get_XTilt(float* x_tilt) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_YTilt(float* y_tilt) { + HRESULT STDMETHODCALLTYPE get_YTilt(float* y_tilt) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_Twist(float* twist) { + HRESULT STDMETHODCALLTYPE get_Twist(float* twist) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_ContactRect(winfoundtn::Rect* rect) { + HRESULT STDMETHODCALLTYPE get_ContactRect(winfoundtn::Rect* rect) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_ContactRectRaw(winfoundtn::Rect* rect) { + HRESULT STDMETHODCALLTYPE + get_ContactRectRaw(winfoundtn::Rect* rect) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_TouchConfidence(boolean* confidence) { + HRESULT STDMETHODCALLTYPE get_TouchConfidence(boolean* confidence) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsPrimary(boolean* is_primary) { + HRESULT STDMETHODCALLTYPE get_IsPrimary(boolean* is_primary) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsInRange(boolean* is_in_range) { + HRESULT STDMETHODCALLTYPE get_IsInRange(boolean* is_in_range) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsCanceled(boolean* is_canceled) { + HRESULT STDMETHODCALLTYPE get_IsCanceled(boolean* is_canceled) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsBarrelButtonPressed( - boolean* is_barrel_button_pressed) { + HRESULT STDMETHODCALLTYPE + get_IsBarrelButtonPressed(boolean* is_barrel_button_pressed) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsXButton1Pressed( - boolean* is_xbutton1_pressed) { + HRESULT STDMETHODCALLTYPE + get_IsXButton1Pressed(boolean* is_xbutton1_pressed) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_IsXButton2Pressed( - boolean* is_xbutton2_pressed) { + HRESULT STDMETHODCALLTYPE + get_IsXButton2Pressed(boolean* is_xbutton2_pressed) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE HasUsage(uint32 usage_page, - uint32 usage_id, - boolean* has_usage) { + HRESULT STDMETHODCALLTYPE + HasUsage(uint32 usage_page, uint32 usage_id, boolean* has_usage) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE GetUsageValue(uint32 usage_page, - uint32 usage_id, - int32* usage_value) { + HRESULT STDMETHODCALLTYPE GetUsageValue(uint32 usage_page, + uint32 usage_id, + int32* usage_value) override { return E_NOTIMPL; } // IPointerDevice implementation. - virtual HRESULT STDMETHODCALLTYPE get_PointerDeviceType( - windevs::Input::PointerDeviceType* device_type) { + HRESULT STDMETHODCALLTYPE get_PointerDeviceType( + windevs::Input::PointerDeviceType* device_type) override { if (msg_.message == WM_TOUCH) { *device_type = windevs::Input::PointerDeviceType_Touch; } else { @@ -334,26 +335,26 @@ class MouseEvent : public mswr::RuntimeClass< return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsIntegrated(boolean* is_integrated) { + HRESULT STDMETHODCALLTYPE get_IsIntegrated(boolean* is_integrated) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_MaxContacts(uint32* contacts) { + HRESULT STDMETHODCALLTYPE get_MaxContacts(uint32* contacts) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_PhysicalDeviceRect( - winfoundtn::Rect* rect) { + HRESULT STDMETHODCALLTYPE + get_PhysicalDeviceRect(winfoundtn::Rect* rect) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_ScreenRect(winfoundtn::Rect* rect) { + HRESULT STDMETHODCALLTYPE get_ScreenRect(winfoundtn::Rect* rect) override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_SupportedUsages( - winfoundtn::Collections::IVectorView< - windevs::Input::PointerDeviceUsage>** usages) { + HRESULT STDMETHODCALLTYPE get_SupportedUsages( + winfoundtn::Collections::IVectorView<windevs::Input::PointerDeviceUsage>** + usages) override { return E_NOTIMPL; } @@ -374,14 +375,14 @@ class KeyEvent : public mswr::RuntimeClass< : msg_(msg) {} // IKeyEventArgs implementation. - virtual HRESULT STDMETHODCALLTYPE get_VirtualKey( - winsys::VirtualKey* virtual_key) { + HRESULT STDMETHODCALLTYPE + get_VirtualKey(winsys::VirtualKey* virtual_key) override { *virtual_key = static_cast<winsys::VirtualKey>(msg_.wParam); return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_KeyStatus( - winui::Core::CorePhysicalKeyStatus* key_status) { + HRESULT STDMETHODCALLTYPE + get_KeyStatus(winui::Core::CorePhysicalKeyStatus* key_status) override { // As per msdn documentation for the keyboard messages. key_status->RepeatCount = msg_.lParam & 0x0000FFFF; key_status->ScanCode = (msg_.lParam >> 16) & 0x00FF; @@ -393,14 +394,14 @@ class KeyEvent : public mswr::RuntimeClass< } // ICharacterReceivedEventArgs implementation. - virtual HRESULT STDMETHODCALLTYPE get_KeyCode(uint32* key_code) { + HRESULT STDMETHODCALLTYPE get_KeyCode(uint32* key_code) override { *key_code = msg_.wParam; return S_OK; } // IAcceleratorKeyEventArgs implementation. - virtual HRESULT STDMETHODCALLTYPE get_EventType( - winui::Core::CoreAcceleratorKeyEventType* event_type) { + HRESULT STDMETHODCALLTYPE + get_EventType(winui::Core::CoreAcceleratorKeyEventType* event_type) override { if (msg_.message == WM_SYSKEYDOWN) { *event_type = winui::Core::CoreAcceleratorKeyEventType_SystemKeyDown; } else if (msg_.message == WM_SYSKEYUP) { @@ -448,12 +449,12 @@ class CoreDispatcherEmulation : accelerator_key_event_handler_(NULL) {} // ICoreDispatcher implementation: - virtual HRESULT STDMETHODCALLTYPE get_HasThreadAccess(boolean* value) { + HRESULT STDMETHODCALLTYPE get_HasThreadAccess(boolean* value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE ProcessEvents( - winui::Core::CoreProcessEventsOption options) { + HRESULT STDMETHODCALLTYPE + ProcessEvents(winui::Core::CoreProcessEventsOption options) override { // We don't support the other message pump modes. So we basically enter a // traditional message loop that we only exit a teardown. if (options != winui::Core::CoreProcessEventsOption_ProcessUntilQuit) @@ -470,30 +471,30 @@ class CoreDispatcherEmulation : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE RunAsync( - winui::Core::CoreDispatcherPriority priority, - winui::Core::IDispatchedHandler *agileCallback, - ABI::Windows::Foundation::IAsyncAction** asyncAction) { + HRESULT STDMETHODCALLTYPE + RunAsync(winui::Core::CoreDispatcherPriority priority, + winui::Core::IDispatchedHandler* agileCallback, + ABI::Windows::Foundation::IAsyncAction** asyncAction) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE RunIdleAsync( - winui::Core::IIdleDispatchedHandler *agileCallback, - winfoundtn::IAsyncAction** asyncAction) { + HRESULT STDMETHODCALLTYPE + RunIdleAsync(winui::Core::IIdleDispatchedHandler* agileCallback, + winfoundtn::IAsyncAction** asyncAction) override { return S_OK; } // ICoreAcceleratorKeys implementation: - virtual HRESULT STDMETHODCALLTYPE add_AcceleratorKeyActivated( - AcceleratorKeyEventHandler* handler, - EventRegistrationToken *pCookie) { + HRESULT STDMETHODCALLTYPE + add_AcceleratorKeyActivated(AcceleratorKeyEventHandler* handler, + EventRegistrationToken* pCookie) override { accelerator_key_event_handler_ = handler; accelerator_key_event_handler_->AddRef(); return S_OK; } - virtual HRESULT STDMETHODCALLTYPE remove_AcceleratorKeyActivated( - EventRegistrationToken cookie) { + HRESULT STDMETHODCALLTYPE + remove_AcceleratorKeyActivated(EventRegistrationToken cookie) override { accelerator_key_event_handler_->Release(); accelerator_key_event_handler_ = NULL; return S_OK; @@ -577,13 +578,12 @@ class CoreWindowEmulation } // ICoreWindow implementation: - virtual HRESULT STDMETHODCALLTYPE get_AutomationHostProvider( - IInspectable** value) override { + HRESULT STDMETHODCALLTYPE + get_AutomationHostProvider(IInspectable** value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_Bounds( - winfoundtn::Rect* value) override { + HRESULT STDMETHODCALLTYPE get_Bounds(winfoundtn::Rect* value) override { RECT rect; if (!::GetClientRect(core_hwnd_, &rect)) return E_FAIL; @@ -592,53 +592,50 @@ class CoreWindowEmulation return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_CustomProperties( - winfoundtn::Collections::IPropertySet** value) override { + HRESULT STDMETHODCALLTYPE + get_CustomProperties(winfoundtn::Collections::IPropertySet** value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_Dispatcher( - winui::Core::ICoreDispatcher** value) override { + HRESULT STDMETHODCALLTYPE + get_Dispatcher(winui::Core::ICoreDispatcher** value) override { return dispatcher_.CopyTo(value); } - virtual HRESULT STDMETHODCALLTYPE get_FlowDirection( - winui::Core::CoreWindowFlowDirection* value) override { + HRESULT STDMETHODCALLTYPE + get_FlowDirection(winui::Core::CoreWindowFlowDirection* value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE put_FlowDirection( - winui::Core::CoreWindowFlowDirection value) override { + HRESULT STDMETHODCALLTYPE + put_FlowDirection(winui::Core::CoreWindowFlowDirection value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsInputEnabled( - boolean* value) override { + HRESULT STDMETHODCALLTYPE get_IsInputEnabled(boolean* value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE put_IsInputEnabled( - boolean value) override { + HRESULT STDMETHODCALLTYPE put_IsInputEnabled(boolean value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_PointerCursor( - winui::Core::ICoreCursor** value) override { + HRESULT STDMETHODCALLTYPE + get_PointerCursor(winui::Core::ICoreCursor** value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE put_PointerCursor( - winui::Core::ICoreCursor* value) override { + HRESULT STDMETHODCALLTYPE + put_PointerCursor(winui::Core::ICoreCursor* value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_PointerPosition( - winfoundtn::Point* value) override { + HRESULT STDMETHODCALLTYPE + get_PointerPosition(winfoundtn::Point* value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_Visible( - boolean* value) override { + HRESULT STDMETHODCALLTYPE get_Visible(boolean* value) override { return S_OK; } @@ -1054,20 +1051,20 @@ class ActivatedEvent : activation_kind_(activation_kind) { } - virtual HRESULT STDMETHODCALLTYPE get_Kind( - winapp::Activation::ActivationKind *value) { + HRESULT STDMETHODCALLTYPE + get_Kind(winapp::Activation::ActivationKind* value) override { *value = activation_kind_; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_PreviousExecutionState( - winapp::Activation::ApplicationExecutionState *value) { + HRESULT STDMETHODCALLTYPE get_PreviousExecutionState( + winapp::Activation::ApplicationExecutionState* value) override { *value = winapp::Activation::ApplicationExecutionState_ClosedByUser; return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_SplashScreen( - winapp::Activation::ISplashScreen **value) { + HRESULT STDMETHODCALLTYPE + get_SplashScreen(winapp::Activation::ISplashScreen** value) override { return E_FAIL; } @@ -1097,16 +1094,16 @@ class CoreApplicationViewEmulation } // ICoreApplicationView implementation: - virtual HRESULT STDMETHODCALLTYPE get_CoreWindow( - winui::Core::ICoreWindow** value) { + HRESULT STDMETHODCALLTYPE + get_CoreWindow(winui::Core::ICoreWindow** value) override { if (!core_window_) return E_FAIL; return core_window_.CopyTo(value); } - virtual HRESULT STDMETHODCALLTYPE add_Activated( - ActivatedHandler* handler, - EventRegistrationToken* token) { + HRESULT STDMETHODCALLTYPE + add_Activated(ActivatedHandler* handler, + EventRegistrationToken* token) override { // The real component supports multiple handles but we don't yet. if (activated_handler_) return E_FAIL; @@ -1114,19 +1111,15 @@ class CoreApplicationViewEmulation return S_OK; } - virtual HRESULT STDMETHODCALLTYPE remove_Activated( - EventRegistrationToken token) { + HRESULT STDMETHODCALLTYPE + remove_Activated(EventRegistrationToken token) override { // Chrome never unregisters handlers, so we don't care about it. return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsMain( - boolean* value) { - return S_OK; - } + HRESULT STDMETHODCALLTYPE get_IsMain(boolean* value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_IsHosted( - boolean* value) { + HRESULT STDMETHODCALLTYPE get_IsHosted(boolean* value) override { return S_OK; } @@ -1141,45 +1134,42 @@ class CoreApplicationWin7Emulation public: // ICoreApplication implementation: - virtual HRESULT STDMETHODCALLTYPE get_Id( - HSTRING* value) { - return S_OK; - } + HRESULT STDMETHODCALLTYPE get_Id(HSTRING* value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE add_Suspending( + HRESULT STDMETHODCALLTYPE add_Suspending( winfoundtn::IEventHandler<winapp::SuspendingEventArgs*>* handler, - EventRegistrationToken* token) { + EventRegistrationToken* token) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE remove_Suspending( - EventRegistrationToken token) { + HRESULT STDMETHODCALLTYPE + remove_Suspending(EventRegistrationToken token) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE add_Resuming( - winfoundtn::IEventHandler<IInspectable*>* handler, - EventRegistrationToken* token) { + HRESULT STDMETHODCALLTYPE + add_Resuming(winfoundtn::IEventHandler<IInspectable*>* handler, + EventRegistrationToken* token) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE remove_Resuming( - EventRegistrationToken token) { + HRESULT STDMETHODCALLTYPE + remove_Resuming(EventRegistrationToken token) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE get_Properties( - winfoundtn::Collections::IPropertySet** value) { + HRESULT STDMETHODCALLTYPE + get_Properties(winfoundtn::Collections::IPropertySet** value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE GetCurrentView( - winapp::Core::ICoreApplicationView** value) { + HRESULT STDMETHODCALLTYPE + GetCurrentView(winapp::Core::ICoreApplicationView** value) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Run( - winapp::Core::IFrameworkViewSource* viewSource) { + HRESULT STDMETHODCALLTYPE + Run(winapp::Core::IFrameworkViewSource* viewSource) override { HRESULT hr = viewSource->CreateView(app_view_.GetAddressOf()); if (FAILED(hr)) return hr; @@ -1204,25 +1194,25 @@ class CoreApplicationWin7Emulation return app_view_->Run(); } - virtual HRESULT STDMETHODCALLTYPE RunWithActivationFactories( - winfoundtn::IGetActivationFactory* activationFactoryCallback) { + HRESULT STDMETHODCALLTYPE RunWithActivationFactories( + winfoundtn::IGetActivationFactory* activationFactoryCallback) override { return S_OK; } // ICoreApplicationExit implementation: - virtual HRESULT STDMETHODCALLTYPE Exit(void) { + HRESULT STDMETHODCALLTYPE Exit(void) override { return view_emulation_->Close(); } - virtual HRESULT STDMETHODCALLTYPE add_Exiting( - winfoundtn::IEventHandler<IInspectable*>* handler, - EventRegistrationToken* token) { + HRESULT STDMETHODCALLTYPE + add_Exiting(winfoundtn::IEventHandler<IInspectable*>* handler, + EventRegistrationToken* token) override { return S_OK; } - virtual HRESULT STDMETHODCALLTYPE remove_Exiting( - EventRegistrationToken token) { + HRESULT STDMETHODCALLTYPE + remove_Exiting(EventRegistrationToken token) override { return S_OK; } diff --git a/win8/test/test_registrar.cc b/win8/test/test_registrar.cc index 0387bb4..ea653ee 100644 --- a/win8/test/test_registrar.cc +++ b/win8/test/test_registrar.cc @@ -72,7 +72,7 @@ class TestDelegateExecuteModule return ParentClass::RegisterServer(FALSE); } - virtual HRESULT AddCommonRGSReplacements(IRegistrarBase* registrar) throw() { + HRESULT AddCommonRGSReplacements(IRegistrarBase* registrar) throw() override { AtlTrace(L"In %hs\n", __FUNCTION__); HRESULT hr = ParentClass::AddCommonRGSReplacements(registrar); if (FAILED(hr)) diff --git a/win8/test/ui_automation_client.cc b/win8/test/ui_automation_client.cc index 6a859af..9aa4237 100644 --- a/win8/test/ui_automation_client.cc +++ b/win8/test/ui_automation_client.cc @@ -118,7 +118,7 @@ class UIAutomationClient::Context::EventHandler // IUIAutomationEventHandler methods. STDMETHOD(HandleAutomationEvent)(IUIAutomationElement* sender, - EVENTID eventId); + EVENTID eventId) override; private: // The task runner for the UI automation client context. |