diff options
author | dcheng <dcheng@chromium.org> | 2015-04-21 14:01:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-21 21:01:49 +0000 |
commit | ad8e1af2fa1e8dc5fa2f861a845897b68500eda9 (patch) | |
tree | b2332aed0d578c6704e0104437495b395ef1aa4d | |
parent | 8c48adbf60df972f0abd4367596f473af265d7a7 (diff) | |
download | chromium_src-ad8e1af2fa1e8dc5fa2f861a845897b68500eda9.zip chromium_src-ad8e1af2fa1e8dc5fa2f861a845897b68500eda9.tar.gz chromium_src-ad8e1af2fa1e8dc5fa2f861a845897b68500eda9.tar.bz2 |
Apply automated fixits for Chrome clang plugin to views_unittests.
Working on trimming down plugin warnings on the Windows clang build.
BUG=467287
Review URL: https://codereview.chromium.org/1085753004
Cr-Commit-Position: refs/heads/master@{#326116}
42 files changed, 555 insertions, 565 deletions
diff --git a/ipc/ipc_channel_win.h b/ipc/ipc_channel_win.h index 3838106..04990d4 100644 --- a/ipc/ipc_channel_win.h +++ b/ipc/ipc_channel_win.h @@ -29,26 +29,24 @@ class ChannelWin : public Channel, // Mirror methods of Channel, see ipc_channel.h for description. ChannelWin(const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener); - ~ChannelWin(); + ~ChannelWin() override; // Channel implementation - virtual bool Connect() override; - virtual void Close() override; - virtual bool Send(Message* message) override; - virtual base::ProcessId GetPeerPID() const override; - virtual base::ProcessId GetSelfPID() const override; + bool Connect() override; + void Close() override; + bool Send(Message* message) override; + base::ProcessId GetPeerPID() const override; + base::ProcessId GetSelfPID() const override; static bool IsNamedServerInitialized(const std::string& channel_id); private: // ChannelReader implementation. - virtual ReadState ReadData(char* buffer, - int buffer_len, - int* bytes_read) override; - virtual bool WillDispatchInputMessage(Message* msg) override; + ReadState ReadData(char* buffer, int buffer_len, int* bytes_read) override; + bool WillDispatchInputMessage(Message* msg) override; bool DidEmptyInputBuffers() override; - virtual void HandleInternalMessage(const Message& msg) override; + void HandleInternalMessage(const Message& msg) override; static const base::string16 PipeName(const std::string& channel_id, int32* secret); @@ -59,9 +57,9 @@ class ChannelWin : public Channel, DWORD bytes_written); // MessageLoop::IOHandler implementation. - virtual void OnIOCompleted(base::MessageLoopForIO::IOContext* context, - DWORD bytes_transfered, - DWORD error) override; + void OnIOCompleted(base::MessageLoopForIO::IOContext* context, + DWORD bytes_transfered, + DWORD error) override; private: struct State { diff --git a/media/audio/win/audio_device_listener_win.h b/media/audio/win/audio_device_listener_win.h index 92777a1..9c2ac48 100644 --- a/media/audio/win/audio_device_listener_win.h +++ b/media/audio/win/audio_device_listener_win.h @@ -36,15 +36,17 @@ class MEDIA_EXPORT AudioDeviceListenerWin : public IMMNotificationClient { friend class AudioDeviceListenerWinTest; // IMMNotificationClient implementation. - STDMETHOD_(ULONG, AddRef)(); - STDMETHOD_(ULONG, Release)(); - STDMETHOD(QueryInterface)(REFIID iid, void** object); - STDMETHOD(OnPropertyValueChanged)(LPCWSTR device_id, const PROPERTYKEY key); - STDMETHOD(OnDeviceAdded)(LPCWSTR device_id); - STDMETHOD(OnDeviceRemoved)(LPCWSTR device_id); - STDMETHOD(OnDeviceStateChanged)(LPCWSTR device_id, DWORD new_state); - STDMETHOD(OnDefaultDeviceChanged)(EDataFlow flow, ERole role, - LPCWSTR new_default_device_id); + STDMETHOD_(ULONG, AddRef)() override; + STDMETHOD_(ULONG, Release)() override; + STDMETHOD(QueryInterface)(REFIID iid, void** object) override; + STDMETHOD(OnPropertyValueChanged)(LPCWSTR device_id, + const PROPERTYKEY key) override; + STDMETHOD(OnDeviceAdded)(LPCWSTR device_id) override; + STDMETHOD(OnDeviceRemoved)(LPCWSTR device_id) override; + STDMETHOD(OnDeviceStateChanged)(LPCWSTR device_id, DWORD new_state) override; + STDMETHOD(OnDefaultDeviceChanged)(EDataFlow flow, + ERole role, + LPCWSTR new_default_device_id) override; base::Closure listener_cb_; ScopedComPtr<IMMDeviceEnumerator> device_enumerator_; diff --git a/media/audio/win/audio_low_latency_input_win.h b/media/audio/win/audio_low_latency_input_win.h index e933a44..7501405 100644 --- a/media/audio/win/audio_low_latency_input_win.h +++ b/media/audio/win/audio_low_latency_input_win.h @@ -92,17 +92,17 @@ class MEDIA_EXPORT WASAPIAudioInputStream // The dtor is typically called by the AudioManager only and it is usually // triggered by calling AudioInputStream::Close(). - virtual ~WASAPIAudioInputStream(); + ~WASAPIAudioInputStream() override; // Implementation of AudioInputStream. - virtual bool Open() override; - virtual void Start(AudioInputCallback* callback) override; - virtual void Stop() override; - virtual void Close() override; - virtual double GetMaxVolume() override; - virtual void SetVolume(double volume) override; - virtual double GetVolume() override; - virtual bool IsMuted() override; + bool Open() override; + void Start(AudioInputCallback* callback) override; + void Stop() override; + void Close() override; + double GetMaxVolume() override; + void SetVolume(double volume) override; + double GetVolume() override; + bool IsMuted() override; bool started() const { return started_; } @@ -111,7 +111,7 @@ class MEDIA_EXPORT WASAPIAudioInputStream private: // DelegateSimpleThread::Delegate implementation. - virtual void Run() override; + void Run() override; // Issues the OnError() callback to the |sink_|. void HandleError(HRESULT err); diff --git a/media/audio/win/audio_low_latency_output_win.h b/media/audio/win/audio_low_latency_output_win.h index 1584a46..9d612b3 100644 --- a/media/audio/win/audio_low_latency_output_win.h +++ b/media/audio/win/audio_low_latency_output_win.h @@ -128,15 +128,15 @@ class MEDIA_EXPORT WASAPIAudioOutputStream : // The dtor is typically called by the AudioManager only and it is usually // triggered by calling AudioOutputStream::Close(). - virtual ~WASAPIAudioOutputStream(); + ~WASAPIAudioOutputStream() override; // Implementation of AudioOutputStream. - virtual bool Open() override; - virtual void Start(AudioSourceCallback* callback) override; - virtual void Stop() override; - virtual void Close() override; - virtual void SetVolume(double volume) override; - virtual void GetVolume(double* volume) override; + bool Open() override; + void Start(AudioSourceCallback* callback) override; + void Stop() override; + void Close() override; + void SetVolume(double volume) override; + void GetVolume(double* volume) override; // Retrieves the sample rate the audio engine uses for its internal // processing/mixing of shared-mode streams. To fetch the settings for the @@ -151,7 +151,7 @@ class MEDIA_EXPORT WASAPIAudioOutputStream : private: // DelegateSimpleThread::Delegate implementation. - virtual void Run() override; + void Run() override; // Core part of the thread loop which controls the actual rendering. // Checks available amount of space in the endpoint buffer and reads diff --git a/media/audio/win/audio_manager_win.h b/media/audio/win/audio_manager_win.h index ce61eb6..9826566 100644 --- a/media/audio/win/audio_manager_win.h +++ b/media/audio/win/audio_manager_win.h @@ -21,35 +21,35 @@ class MEDIA_EXPORT AudioManagerWin : public AudioManagerBase { AudioManagerWin(AudioLogFactory* audio_log_factory); // Implementation of AudioManager. - virtual bool HasAudioOutputDevices() override; - virtual bool HasAudioInputDevices() override; - virtual base::string16 GetAudioInputDeviceModel() override; - virtual void ShowAudioInputSettings() override; - virtual void GetAudioInputDeviceNames( - AudioDeviceNames* device_names) override; - virtual void GetAudioOutputDeviceNames( - AudioDeviceNames* device_names) override; - virtual AudioParameters GetInputStreamParameters( + bool HasAudioOutputDevices() override; + bool HasAudioInputDevices() override; + base::string16 GetAudioInputDeviceModel() override; + void ShowAudioInputSettings() override; + void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override; + void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override; + AudioParameters GetInputStreamParameters( const std::string& device_id) override; - virtual std::string GetAssociatedOutputDeviceID( + std::string GetAssociatedOutputDeviceID( const std::string& input_device_id) override; // Implementation of AudioManagerBase. - virtual AudioOutputStream* MakeLinearOutputStream( + AudioOutputStream* MakeLinearOutputStream( const AudioParameters& params) override; - virtual AudioOutputStream* MakeLowLatencyOutputStream( + AudioOutputStream* MakeLowLatencyOutputStream( const AudioParameters& params, const std::string& device_id) override; - virtual AudioInputStream* MakeLinearInputStream( - const AudioParameters& params, const std::string& device_id) override; - virtual AudioInputStream* MakeLowLatencyInputStream( - const AudioParameters& params, const std::string& device_id) override; - virtual std::string GetDefaultOutputDeviceID() override; + AudioInputStream* MakeLinearInputStream( + const AudioParameters& params, + const std::string& device_id) override; + AudioInputStream* MakeLowLatencyInputStream( + const AudioParameters& params, + const std::string& device_id) override; + std::string GetDefaultOutputDeviceID() override; protected: - virtual ~AudioManagerWin(); + ~AudioManagerWin() override; - virtual AudioParameters GetPreferredOutputStreamParameters( + AudioParameters GetPreferredOutputStreamParameters( const std::string& output_device_id, const AudioParameters& input_params) override; diff --git a/media/audio/win/wavein_input_win.h b/media/audio/win/wavein_input_win.h index 6b98d0d..a2c77c3 100644 --- a/media/audio/win/wavein_input_win.h +++ b/media/audio/win/wavein_input_win.h @@ -32,20 +32,20 @@ class PCMWaveInAudioInputStream : public AudioInputStream { const AudioParameters& params, int num_buffers, const std::string& device_id); - virtual ~PCMWaveInAudioInputStream(); + ~PCMWaveInAudioInputStream() override; // Implementation of AudioInputStream. - virtual bool Open() override; - virtual void Start(AudioInputCallback* callback) override; - virtual void Stop() override; - virtual void Close() override; + bool Open() override; + void Start(AudioInputCallback* callback) override; + void Stop() override; + void Close() override; // TODO(henrika): Add volume support using the Audio Mixer API. - virtual double GetMaxVolume() override; - virtual void SetVolume(double volume) override; - virtual double GetVolume() override; - virtual bool SetAutomaticGainControl(bool enabled) override; - virtual bool GetAutomaticGainControl() override; - virtual bool IsMuted() override; + double GetMaxVolume() override; + void SetVolume(double volume) override; + double GetVolume() override; + bool SetAutomaticGainControl(bool enabled) override; + bool GetAutomaticGainControl() override; + bool IsMuted() override; private: enum State { diff --git a/media/audio/win/waveout_output_win.h b/media/audio/win/waveout_output_win.h index 5c7009d..bd9da5e 100644 --- a/media/audio/win/waveout_output_win.h +++ b/media/audio/win/waveout_output_win.h @@ -38,15 +38,15 @@ class PCMWaveOutAudioOutputStream : public AudioOutputStream { const AudioParameters& params, int num_buffers, UINT device_id); - virtual ~PCMWaveOutAudioOutputStream(); + ~PCMWaveOutAudioOutputStream() override; // Implementation of AudioOutputStream. - virtual bool Open(); - virtual void Close(); - virtual void Start(AudioSourceCallback* callback); - virtual void Stop(); - virtual void SetVolume(double volume); - virtual void GetVolume(double* volume); + bool Open() override; + void Close() override; + void Start(AudioSourceCallback* callback) override; + void Stop() override; + void SetVolume(double volume) override; + void GetVolume(double* volume) override; // Sends a buffer to the audio driver for playback. void QueueNextPacket(WAVEHDR* buffer); diff --git a/media/base/user_input_monitor_win.cc b/media/base/user_input_monitor_win.cc index d06b824..6210236 100644 --- a/media/base/user_input_monitor_win.cc +++ b/media/base/user_input_monitor_win.cc @@ -39,10 +39,10 @@ class UserInputMonitorWinCore scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, const scoped_refptr<UserInputMonitor::MouseListenerList>& mouse_listeners); - ~UserInputMonitorWinCore(); + ~UserInputMonitorWinCore() override; // DestructionObserver overrides. - virtual void WillDestroyCurrentMessageLoop() override; + void WillDestroyCurrentMessageLoop() override; size_t GetKeyPressCount() const; void StartMonitor(EventBitMask type); @@ -75,17 +75,17 @@ class UserInputMonitorWin : public UserInputMonitor { public: explicit UserInputMonitorWin( const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner); - virtual ~UserInputMonitorWin(); + ~UserInputMonitorWin() override; // Public UserInputMonitor overrides. - virtual size_t GetKeyPressCount() const override; + size_t GetKeyPressCount() const override; private: // Private UserInputMonitor overrides. - virtual void StartKeyboardMonitoring() override; - virtual void StopKeyboardMonitoring() override; - virtual void StartMouseMonitoring() override; - virtual void StopMouseMonitoring() override; + void StartKeyboardMonitoring() override; + void StopKeyboardMonitoring() override; + void StartMouseMonitoring() override; + void StopMouseMonitoring() override; scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; UserInputMonitorWinCore* core_; diff --git a/media/midi/midi_manager_win.h b/media/midi/midi_manager_win.h index 9cb8fb0..73c1fe5 100644 --- a/media/midi/midi_manager_win.h +++ b/media/midi/midi_manager_win.h @@ -42,7 +42,7 @@ class MidiServiceWin { class MidiManagerWin final : public MidiManager, public MidiServiceWinDelegate { public: MidiManagerWin() {} - virtual ~MidiManagerWin() { midi_service_.reset(); } + ~MidiManagerWin() override { midi_service_.reset(); } // MidiManager overrides: void StartInitialization() final; diff --git a/media/video/capture/win/filter_base_win.cc b/media/video/capture/win/filter_base_win.cc index 96709d5..1c3e24e 100644 --- a/media/video/capture/win/filter_base_win.cc +++ b/media/video/capture/win/filter_base_win.cc @@ -22,7 +22,7 @@ class PinEnumerator final } // IUnknown implementation. - STDMETHOD(QueryInterface)(REFIID iid, void** object_ptr) { + STDMETHOD(QueryInterface)(REFIID iid, void** object_ptr) override { if (iid == IID_IEnumPins || iid == IID_IUnknown) { AddRef(); *object_ptr = static_cast<IEnumPins*>(this); @@ -31,18 +31,18 @@ class PinEnumerator final return E_NOINTERFACE; } - STDMETHOD_(ULONG, AddRef)() { + STDMETHOD_(ULONG, AddRef)() override { base::RefCounted<PinEnumerator>::AddRef(); return 1; } - STDMETHOD_(ULONG, Release)() { + STDMETHOD_(ULONG, Release)() override { base::RefCounted<PinEnumerator>::Release(); return 1; } // Implement IEnumPins. - STDMETHOD(Next)(ULONG count, IPin** pins, ULONG* fetched) { + STDMETHOD(Next)(ULONG count, IPin** pins, ULONG* fetched) override { ULONG pins_fetched = 0; while (pins_fetched < count && filter_->NoOfPins() > index_) { IPin* pin = filter_->GetPin(index_++); @@ -56,7 +56,7 @@ class PinEnumerator final return pins_fetched == count ? S_OK : S_FALSE; } - STDMETHOD(Skip)(ULONG count) { + STDMETHOD(Skip)(ULONG count) override { if (filter_->NoOfPins()- index_ > count) { index_ += count; return S_OK; @@ -65,12 +65,12 @@ class PinEnumerator final return S_FALSE; } - STDMETHOD(Reset)() { + STDMETHOD(Reset)() override { index_ = 0; return S_OK; } - STDMETHOD(Clone)(IEnumPins** clone) { + STDMETHOD(Clone)(IEnumPins** clone) override { PinEnumerator* pin_enum = new PinEnumerator(filter_.get()); pin_enum->AddRef(); pin_enum->index_ = index_; diff --git a/media/video/capture/win/filter_base_win.h b/media/video/capture/win/filter_base_win.h index 9d5aa76..e490f42 100644 --- a/media/video/capture/win/filter_base_win.h +++ b/media/video/capture/win/filter_base_win.h @@ -30,36 +30,36 @@ class FilterBase virtual IPin* GetPin(int index) = 0; // Inherited from IUnknown. - STDMETHOD(QueryInterface)(REFIID id, void** object_ptr); - STDMETHOD_(ULONG, AddRef)(); - STDMETHOD_(ULONG, Release)(); + STDMETHOD(QueryInterface)(REFIID id, void** object_ptr) override; + STDMETHOD_(ULONG, AddRef)() override; + STDMETHOD_(ULONG, Release)() override; // Inherited from IBaseFilter. - STDMETHOD(EnumPins)(IEnumPins** enum_pins); + STDMETHOD(EnumPins)(IEnumPins** enum_pins) override; - STDMETHOD(FindPin)(LPCWSTR id, IPin** pin); + STDMETHOD(FindPin)(LPCWSTR id, IPin** pin) override; - STDMETHOD(QueryFilterInfo)(FILTER_INFO* info); + STDMETHOD(QueryFilterInfo)(FILTER_INFO* info) override; - STDMETHOD(JoinFilterGraph)(IFilterGraph* graph, LPCWSTR name); + STDMETHOD(JoinFilterGraph)(IFilterGraph* graph, LPCWSTR name) override; - STDMETHOD(QueryVendorInfo)(LPWSTR* vendor_info); + STDMETHOD(QueryVendorInfo)(LPWSTR* vendor_info) override; // Inherited from IMediaFilter. - STDMETHOD(Stop)(); + STDMETHOD(Stop)() override; - STDMETHOD(Pause)(); + STDMETHOD(Pause)() override; - STDMETHOD(Run)(REFERENCE_TIME start); + STDMETHOD(Run)(REFERENCE_TIME start) override; - STDMETHOD(GetState)(DWORD msec_timeout, FILTER_STATE* state); + STDMETHOD(GetState)(DWORD msec_timeout, FILTER_STATE* state) override; - STDMETHOD(SetSyncSource)(IReferenceClock* clock); + STDMETHOD(SetSyncSource)(IReferenceClock* clock) override; - STDMETHOD(GetSyncSource)(IReferenceClock** clock); + STDMETHOD(GetSyncSource)(IReferenceClock** clock) override; // Inherited from IPersistent. - STDMETHOD(GetClassID)(CLSID* class_id) = 0; + STDMETHOD(GetClassID)(CLSID* class_id) override = 0; private: FILTER_STATE state_; diff --git a/media/video/capture/win/pin_base_win.cc b/media/video/capture/win/pin_base_win.cc index 92453c1..d2efa8b 100644 --- a/media/video/capture/win/pin_base_win.cc +++ b/media/video/capture/win/pin_base_win.cc @@ -22,7 +22,7 @@ class TypeEnumerator final } // Implement from IUnknown. - STDMETHOD(QueryInterface)(REFIID iid, void** object_ptr) { + STDMETHOD(QueryInterface)(REFIID iid, void** object_ptr) override { if (iid == IID_IEnumMediaTypes || iid == IID_IUnknown) { AddRef(); *object_ptr = static_cast<IEnumMediaTypes*>(this); @@ -31,18 +31,18 @@ class TypeEnumerator final return E_NOINTERFACE; } - STDMETHOD_(ULONG, AddRef)() { + STDMETHOD_(ULONG, AddRef)() override { base::RefCounted<TypeEnumerator>::AddRef(); return 1; } - STDMETHOD_(ULONG, Release)() { + STDMETHOD_(ULONG, Release)() override { base::RefCounted<TypeEnumerator>::Release(); return 1; } // Implement IEnumMediaTypes. - STDMETHOD(Next)(ULONG count, AM_MEDIA_TYPE** types, ULONG* fetched) { + STDMETHOD(Next)(ULONG count, AM_MEDIA_TYPE** types, ULONG* fetched) override { ULONG types_fetched = 0; while (types_fetched < count) { @@ -81,17 +81,17 @@ class TypeEnumerator final return types_fetched == count ? S_OK : S_FALSE; } - STDMETHOD(Skip)(ULONG count) { + STDMETHOD(Skip)(ULONG count) override { index_ += count; return S_OK; } - STDMETHOD(Reset)() { + STDMETHOD(Reset)() override { index_ = 0; return S_OK; } - STDMETHOD(Clone)(IEnumMediaTypes** clone) { + STDMETHOD(Clone)(IEnumMediaTypes** clone) override { TypeEnumerator* type_enum = new TypeEnumerator(pin_.get()); type_enum->AddRef(); type_enum->index_ = index_; diff --git a/media/video/capture/win/pin_base_win.h b/media/video/capture/win/pin_base_win.h index 33f403f..7ad5436 100644 --- a/media/video/capture/win/pin_base_win.h +++ b/media/video/capture/win/pin_base_win.h @@ -40,59 +40,61 @@ class PinBase // Called when new media is received. Note that this is not on the same // thread as where the pin is created. - STDMETHOD(Receive)(IMediaSample* sample) = 0; + STDMETHOD(Receive)(IMediaSample* sample) override = 0; - STDMETHOD(Connect)(IPin* receive_pin, const AM_MEDIA_TYPE* media_type); + STDMETHOD(Connect)(IPin* receive_pin, + const AM_MEDIA_TYPE* media_type) override; STDMETHOD(ReceiveConnection)(IPin* connector, - const AM_MEDIA_TYPE* media_type); + const AM_MEDIA_TYPE* media_type) override; - STDMETHOD(Disconnect)(); + STDMETHOD(Disconnect)() override; - STDMETHOD(ConnectedTo)(IPin** pin); + STDMETHOD(ConnectedTo)(IPin** pin) override; - STDMETHOD(ConnectionMediaType)(AM_MEDIA_TYPE* media_type); + STDMETHOD(ConnectionMediaType)(AM_MEDIA_TYPE* media_type) override; - STDMETHOD(QueryPinInfo)(PIN_INFO* info); + STDMETHOD(QueryPinInfo)(PIN_INFO* info) override; - STDMETHOD(QueryDirection)(PIN_DIRECTION* pin_dir); + STDMETHOD(QueryDirection)(PIN_DIRECTION* pin_dir) override; - STDMETHOD(QueryId)(LPWSTR* id); + STDMETHOD(QueryId)(LPWSTR* id) override; - STDMETHOD(QueryAccept)(const AM_MEDIA_TYPE* media_type); + STDMETHOD(QueryAccept)(const AM_MEDIA_TYPE* media_type) override; - STDMETHOD(EnumMediaTypes)(IEnumMediaTypes** types); + STDMETHOD(EnumMediaTypes)(IEnumMediaTypes** types) override; - STDMETHOD(QueryInternalConnections)(IPin** pins, ULONG* no_pins); + STDMETHOD(QueryInternalConnections)(IPin** pins, ULONG* no_pins) override; - STDMETHOD(EndOfStream)(); + STDMETHOD(EndOfStream)() override; - STDMETHOD(BeginFlush)(); + STDMETHOD(BeginFlush)() override; - STDMETHOD(EndFlush)(); + STDMETHOD(EndFlush)() override; STDMETHOD(NewSegment)(REFERENCE_TIME start, REFERENCE_TIME stop, - double dRate); + double dRate) override; // Inherited from IMemInputPin. - STDMETHOD(GetAllocator)(IMemAllocator** allocator); + STDMETHOD(GetAllocator)(IMemAllocator** allocator) override; - STDMETHOD(NotifyAllocator)(IMemAllocator* allocator, BOOL read_only); + STDMETHOD(NotifyAllocator)(IMemAllocator* allocator, BOOL read_only) override; - STDMETHOD(GetAllocatorRequirements)(ALLOCATOR_PROPERTIES* properties); + STDMETHOD(GetAllocatorRequirements)( + ALLOCATOR_PROPERTIES* properties) override; STDMETHOD(ReceiveMultiple)(IMediaSample** samples, long sample_count, - long* processed); - STDMETHOD(ReceiveCanBlock)(); + long* processed) override; + STDMETHOD(ReceiveCanBlock)() override; // Inherited from IUnknown. - STDMETHOD(QueryInterface)(REFIID id, void** object_ptr); + STDMETHOD(QueryInterface)(REFIID id, void** object_ptr) override; - STDMETHOD_(ULONG, AddRef)(); + STDMETHOD_(ULONG, AddRef)() override; - STDMETHOD_(ULONG, Release)(); + STDMETHOD_(ULONG, Release)() override; private: AM_MEDIA_TYPE current_media_type_; diff --git a/media/video/capture/win/sink_filter_win.h b/media/video/capture/win/sink_filter_win.h index 831fd48..f9ff0c9 100644 --- a/media/video/capture/win/sink_filter_win.h +++ b/media/video/capture/win/sink_filter_win.h @@ -35,7 +35,7 @@ class __declspec(uuid("88cdbbdc-a73b-4afa-acbf-15d5e2ce12c3")) SinkFilter : public FilterBase { public: explicit SinkFilter(SinkFilterObserver* observer); - virtual ~SinkFilter(); + ~SinkFilter() override; void SetRequestedMediaFormat(VideoPixelFormat pixel_format, float frame_rate, @@ -45,10 +45,10 @@ class __declspec(uuid("88cdbbdc-a73b-4afa-acbf-15d5e2ce12c3")) const VideoCaptureFormat& ResultingFormat(); // Implement FilterBase. - virtual size_t NoOfPins(); - virtual IPin* GetPin(int index); + size_t NoOfPins() override; + IPin* GetPin(int index) override; - STDMETHOD(GetClassID)(CLSID* clsid); + STDMETHOD(GetClassID)(CLSID* clsid) override; private: scoped_refptr<SinkInputPin> input_pin_; diff --git a/media/video/capture/win/sink_input_pin_win.h b/media/video/capture/win/sink_input_pin_win.h index ffe5245..1ee23a9 100644 --- a/media/video/capture/win/sink_input_pin_win.h +++ b/media/video/capture/win/sink_input_pin_win.h @@ -22,7 +22,7 @@ extern const REFERENCE_TIME kSecondsToReferenceTime; class SinkInputPin : public PinBase { public: SinkInputPin(IBaseFilter* filter, SinkFilterObserver* observer); - virtual ~SinkInputPin(); + ~SinkInputPin() override; void SetRequestedMediaFormat(VideoPixelFormat pixel_format, float frame_rate, @@ -32,10 +32,10 @@ class SinkInputPin : public PinBase { const VideoCaptureFormat& ResultingFormat(); // Implement PinBase. - virtual bool IsMediaTypeValid(const AM_MEDIA_TYPE* media_type); - virtual bool GetValidMediaType(int index, AM_MEDIA_TYPE* media_type); + bool IsMediaTypeValid(const AM_MEDIA_TYPE* media_type) override; + bool GetValidMediaType(int index, AM_MEDIA_TYPE* media_type) override; - STDMETHOD(Receive)(IMediaSample* media_sample); + STDMETHOD(Receive)(IMediaSample* media_sample) override; private: VideoPixelFormat requested_pixel_format_; diff --git a/media/video/capture/win/video_capture_device_factory_win.h b/media/video/capture/win/video_capture_device_factory_win.h index 849e1ad..f76fe63 100644 --- a/media/video/capture/win/video_capture_device_factory_win.h +++ b/media/video/capture/win/video_capture_device_factory_win.h @@ -19,12 +19,12 @@ class MEDIA_EXPORT VideoCaptureDeviceFactoryWin : static bool PlatformSupportsMediaFoundation(); VideoCaptureDeviceFactoryWin(); - virtual ~VideoCaptureDeviceFactoryWin() {} + ~VideoCaptureDeviceFactoryWin() override {} - virtual scoped_ptr<VideoCaptureDevice> Create( + scoped_ptr<VideoCaptureDevice> Create( const VideoCaptureDevice::Name& device_name) override; - virtual void GetDeviceNames(VideoCaptureDevice::Names* device_names) override; - virtual void GetDeviceSupportedFormats( + void GetDeviceNames(VideoCaptureDevice::Names* device_names) override; + void GetDeviceSupportedFormats( const VideoCaptureDevice::Name& device, VideoCaptureFormats* supported_formats) override; diff --git a/media/video/capture/win/video_capture_device_mf_win.cc b/media/video/capture/win/video_capture_device_mf_win.cc index 3d3fb16..95ade71 100644 --- a/media/video/capture/win/video_capture_device_mf_win.cc +++ b/media/video/capture/win/video_capture_device_mf_win.cc @@ -91,7 +91,7 @@ class MFReaderCallback final wait_event_ = event; } - STDMETHOD(QueryInterface)(REFIID riid, void** object) { + STDMETHOD(QueryInterface)(REFIID riid, void** object) override { if (riid != IID_IUnknown && riid != IID_IMFSourceReaderCallback) return E_NOINTERFACE; *object = static_cast<IMFSourceReaderCallback*>(this); @@ -99,18 +99,21 @@ class MFReaderCallback final return S_OK; } - STDMETHOD_(ULONG, AddRef)() { + STDMETHOD_(ULONG, AddRef)() override { base::RefCountedThreadSafe<MFReaderCallback>::AddRef(); return 1U; } - STDMETHOD_(ULONG, Release)() { + STDMETHOD_(ULONG, Release)() override { base::RefCountedThreadSafe<MFReaderCallback>::Release(); return 1U; } - STDMETHOD(OnReadSample)(HRESULT status, DWORD stream_index, - DWORD stream_flags, LONGLONG time_stamp, IMFSample* sample) { + STDMETHOD(OnReadSample)(HRESULT status, + DWORD stream_index, + DWORD stream_flags, + LONGLONG time_stamp, + IMFSample* sample) override { base::TimeTicks stamp(base::TimeTicks::Now()); if (!sample) { observer_->OnIncomingCapturedData(NULL, 0, 0, stamp); @@ -134,7 +137,7 @@ class MFReaderCallback final return S_OK; } - STDMETHOD(OnFlush)(DWORD stream_index) { + STDMETHOD(OnFlush)(DWORD stream_index) override { if (wait_event_) { wait_event_->Signal(); wait_event_ = NULL; @@ -142,7 +145,7 @@ class MFReaderCallback final return S_OK; } - STDMETHOD(OnEvent)(DWORD stream_index, IMFMediaEvent* event) { + STDMETHOD(OnEvent)(DWORD stream_index, IMFMediaEvent* event) override { NOTIMPLEMENTED(); return S_OK; } diff --git a/media/video/capture/win/video_capture_device_mf_win.h b/media/video/capture/win/video_capture_device_mf_win.h index fc11d19..eeb7edf 100644 --- a/media/video/capture/win/video_capture_device_mf_win.h +++ b/media/video/capture/win/video_capture_device_mf_win.h @@ -36,16 +36,15 @@ class MEDIA_EXPORT VideoCaptureDeviceMFWin static bool FormatFromGuid(const GUID& guid, VideoPixelFormat* format); explicit VideoCaptureDeviceMFWin(const Name& device_name); - virtual ~VideoCaptureDeviceMFWin(); + ~VideoCaptureDeviceMFWin() override; // Opens the device driver for this device. bool Init(const base::win::ScopedComPtr<IMFMediaSource>& source); // VideoCaptureDevice implementation. - virtual void AllocateAndStart(const VideoCaptureParams& params, - scoped_ptr<VideoCaptureDevice::Client> client) - override; - virtual void StopAndDeAllocate() override; + void AllocateAndStart(const VideoCaptureParams& params, + scoped_ptr<VideoCaptureDevice::Client> client) override; + void StopAndDeAllocate() override; // Captured new video data. void OnIncomingCapturedData(const uint8* data, diff --git a/media/video/capture/win/video_capture_device_win.h b/media/video/capture/win/video_capture_device_win.h index f758c2c..9315754 100644 --- a/media/video/capture/win/video_capture_device_win.h +++ b/media/video/capture/win/video_capture_device_win.h @@ -64,15 +64,14 @@ class VideoCaptureDeviceWin const GUID& sub_type); explicit VideoCaptureDeviceWin(const Name& device_name); - virtual ~VideoCaptureDeviceWin(); + ~VideoCaptureDeviceWin() override; // Opens the device driver for this device. bool Init(); // VideoCaptureDevice implementation. - virtual void AllocateAndStart( - const VideoCaptureParams& params, - scoped_ptr<VideoCaptureDevice::Client> client) override; - virtual void StopAndDeAllocate() override; + void AllocateAndStart(const VideoCaptureParams& params, + scoped_ptr<VideoCaptureDevice::Client> client) override; + void StopAndDeAllocate() override; private: enum InternalState { @@ -83,7 +82,7 @@ class VideoCaptureDeviceWin }; // Implements SinkFilterObserver. - virtual void FrameReceived(const uint8* buffer, int length); + void FrameReceived(const uint8* buffer, int length) override; bool CreateCapabilityMap(); void SetAntiFlickerInCaptureFilter(); diff --git a/ui/accessibility/platform/ax_platform_node_win.h b/ui/accessibility/platform/ax_platform_node_win.h index af45654..31ca0b2 100644 --- a/ui/accessibility/platform/ax_platform_node_win.h +++ b/ui/accessibility/platform/ax_platform_node_win.h @@ -33,7 +33,7 @@ AXPlatformNodeWin COM_INTERFACE_ENTRY(IServiceProvider) END_COM_MAP() - virtual ~AXPlatformNodeWin(); + ~AXPlatformNodeWin() override; // AXPlatformNode overrides. void Destroy() override; @@ -48,67 +48,69 @@ AXPlatformNodeWin // // Retrieves the child element or child object at a given point on the screen. - virtual STDMETHODIMP accHitTest(LONG x_left, LONG y_top, VARIANT* child); + STDMETHODIMP accHitTest(LONG x_left, LONG y_top, VARIANT* child) override; // Performs the object's default action. - STDMETHODIMP accDoDefaultAction(VARIANT var_id); + STDMETHODIMP accDoDefaultAction(VARIANT var_id) override; // Retrieves the specified object's current screen location. STDMETHODIMP accLocation(LONG* x_left, LONG* y_top, LONG* width, LONG* height, - VARIANT var_id); + VARIANT var_id) override; // Traverses to another UI element and retrieves the object. - STDMETHODIMP accNavigate(LONG nav_dir, VARIANT start, VARIANT* end); + STDMETHODIMP accNavigate(LONG nav_dir, VARIANT start, VARIANT* end) override; // Retrieves an IDispatch interface pointer for the specified child. - virtual STDMETHODIMP get_accChild(VARIANT var_child, IDispatch** disp_child); + STDMETHODIMP get_accChild(VARIANT var_child, IDispatch** disp_child) override; // Retrieves the number of accessible children. - virtual STDMETHODIMP get_accChildCount(LONG* child_count); + STDMETHODIMP get_accChildCount(LONG* child_count) override; // Retrieves a string that describes the object's default action. - STDMETHODIMP get_accDefaultAction(VARIANT var_id, BSTR* default_action); + STDMETHODIMP get_accDefaultAction(VARIANT var_id, + BSTR* default_action) override; // Retrieves the tooltip description. - STDMETHODIMP get_accDescription(VARIANT var_id, BSTR* desc); + STDMETHODIMP get_accDescription(VARIANT var_id, BSTR* desc) override; // Retrieves the object that has the keyboard focus. - STDMETHODIMP get_accFocus(VARIANT* focus_child); + STDMETHODIMP get_accFocus(VARIANT* focus_child) override; // Retrieves the specified object's shortcut. - STDMETHODIMP get_accKeyboardShortcut(VARIANT var_id, BSTR* access_key); + STDMETHODIMP get_accKeyboardShortcut(VARIANT var_id, + BSTR* access_key) override; // Retrieves the name of the specified object. - STDMETHODIMP get_accName(VARIANT var_id, BSTR* name); + STDMETHODIMP get_accName(VARIANT var_id, BSTR* name) override; // Retrieves the IDispatch interface of the object's parent. - STDMETHODIMP get_accParent(IDispatch** disp_parent); + STDMETHODIMP get_accParent(IDispatch** disp_parent) override; // Retrieves information describing the role of the specified object. - STDMETHODIMP get_accRole(VARIANT var_id, VARIANT* role); + STDMETHODIMP get_accRole(VARIANT var_id, VARIANT* role) override; // Retrieves the current state of the specified object. - STDMETHODIMP get_accState(VARIANT var_id, VARIANT* state); + STDMETHODIMP get_accState(VARIANT var_id, VARIANT* state) override; // Gets the help string for the specified object. - STDMETHODIMP get_accHelp(VARIANT var_id, BSTR* help); + STDMETHODIMP get_accHelp(VARIANT var_id, BSTR* help) override; // Retrieve or set the string value associated with the specified object. // Setting the value is not typically used by screen readers, but it's // used frequently by automation software. - STDMETHODIMP get_accValue(VARIANT var_id, BSTR* value); - STDMETHODIMP put_accValue(VARIANT var_id, BSTR new_value); + STDMETHODIMP get_accValue(VARIANT var_id, BSTR* value) override; + STDMETHODIMP put_accValue(VARIANT var_id, BSTR new_value) override; // IAccessible methods not implemented. - STDMETHODIMP get_accSelection(VARIANT* selected); - STDMETHODIMP accSelect(LONG flags_sel, VARIANT var_id); + STDMETHODIMP get_accSelection(VARIANT* selected) override; + STDMETHODIMP accSelect(LONG flags_sel, VARIANT var_id) override; STDMETHODIMP get_accHelpTopic(BSTR* help_file, VARIANT var_id, - LONG* topic_id); - STDMETHODIMP put_accName(VARIANT var_id, BSTR put_name); + LONG* topic_id) override; + STDMETHODIMP put_accName(VARIANT var_id, BSTR put_name) override; // // IAccessible2 methods. @@ -282,7 +284,9 @@ AXPlatformNodeWin // IServiceProvider methods. // - STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void** object); + STDMETHODIMP QueryService(REFGUID guidService, + REFIID riid, + void** object) override; protected: AXPlatformNodeWin(); diff --git a/ui/aura/input_state_lookup_win.h b/ui/aura/input_state_lookup_win.h index 94e4ee6..04741fd 100644 --- a/ui/aura/input_state_lookup_win.h +++ b/ui/aura/input_state_lookup_win.h @@ -15,10 +15,10 @@ namespace aura { class AURA_EXPORT InputStateLookupWin : public InputStateLookup { public: InputStateLookupWin(); - virtual ~InputStateLookupWin(); + ~InputStateLookupWin() override; // InputStateLookup overrides: - virtual bool IsMouseButtonDown() const override; + bool IsMouseButtonDown() const override; private: DISALLOW_COPY_AND_ASSIGN(InputStateLookupWin); diff --git a/ui/aura/remote_window_tree_host_win.h b/ui/aura/remote_window_tree_host_win.h index b680cc8..4cde32c 100644 --- a/ui/aura/remote_window_tree_host_win.h +++ b/ui/aura/remote_window_tree_host_win.h @@ -79,7 +79,7 @@ class AURA_EXPORT RemoteWindowTreeHostWin protected: RemoteWindowTreeHostWin(); - virtual ~RemoteWindowTreeHostWin(); + ~RemoteWindowTreeHostWin() override; private: // IPC message handing methods: @@ -116,25 +116,25 @@ class AURA_EXPORT RemoteWindowTreeHostWin void OnImeInputSourceChanged(uint16 language_id, bool is_ime); // WindowTreeHost overrides: - virtual ui::EventSource* GetEventSource() override; - virtual gfx::AcceleratedWidget GetAcceleratedWidget() override; - virtual void Show() override; - virtual void Hide() override; - virtual gfx::Rect GetBounds() const override; - virtual void SetBounds(const gfx::Rect& bounds) override; - virtual gfx::Point GetLocationOnNativeScreen() const override; - virtual void SetCapture() override; - virtual void ReleaseCapture() override; - virtual void SetCursorNative(gfx::NativeCursor cursor) override; - virtual void MoveCursorToNative(const gfx::Point& location) override; - virtual void OnCursorVisibilityChangedNative(bool show) override; + ui::EventSource* GetEventSource() override; + gfx::AcceleratedWidget GetAcceleratedWidget() override; + void Show() override; + void Hide() override; + gfx::Rect GetBounds() const override; + void SetBounds(const gfx::Rect& bounds) override; + gfx::Point GetLocationOnNativeScreen() const override; + void SetCapture() override; + void ReleaseCapture() override; + void SetCursorNative(gfx::NativeCursor cursor) override; + void MoveCursorToNative(const gfx::Point& location) override; + void OnCursorVisibilityChangedNative(bool show) override; // ui::EventSource: - virtual ui::EventProcessor* GetEventProcessor() override; + ui::EventProcessor* GetEventProcessor() override; // ui::internal::RemoteInputMethodDelegateWin overrides: - virtual void CancelComposition() override; - virtual void OnTextInputClientUpdated( + void CancelComposition() override; + void OnTextInputClientUpdated( const std::vector<int32>& input_scopes, const std::vector<gfx::Rect>& composition_character_bounds) override; diff --git a/ui/aura/test/ui_controls_factory_aurawin.cc b/ui/aura/test/ui_controls_factory_aurawin.cc index 717aea5..36953eb 100644 --- a/ui/aura/test/ui_controls_factory_aurawin.cc +++ b/ui/aura/test/ui_controls_factory_aurawin.cc @@ -30,50 +30,51 @@ class UIControlsWin : public UIControlsAura { UIControlsWin() {} // UIControlsAura overrides: - virtual bool SendKeyPress(gfx::NativeWindow native_window, - ui::KeyboardCode key, - bool control, - bool shift, - bool alt, - bool command) { + bool SendKeyPress(gfx::NativeWindow native_window, + ui::KeyboardCode key, + bool control, + bool shift, + bool alt, + bool command) override { DCHECK(!command); // No command key on Aura HWND window = native_window->GetHost()->GetAcceleratedWidget(); return SendKeyPressImpl( window, key, control, shift, alt, base::Closure()); } - virtual bool SendKeyPressNotifyWhenDone(gfx::NativeWindow native_window, - ui::KeyboardCode key, - bool control, - bool shift, - bool alt, - bool command, - const base::Closure& task) { + bool SendKeyPressNotifyWhenDone(gfx::NativeWindow native_window, + ui::KeyboardCode key, + bool control, + bool shift, + bool alt, + bool command, + const base::Closure& task) override { DCHECK(!command); // No command key on Aura HWND window = native_window->GetHost()->GetAcceleratedWidget(); return SendKeyPressImpl(window, key, control, shift, alt, task); } - virtual bool SendMouseMove(long screen_x, long screen_y) { + bool SendMouseMove(long screen_x, long screen_y) override { return SendMouseMoveImpl(screen_x, screen_y, base::Closure()); } - virtual bool SendMouseMoveNotifyWhenDone(long screen_x, - long screen_y, - const base::Closure& task) { + bool SendMouseMoveNotifyWhenDone(long screen_x, + long screen_y, + const base::Closure& task) override { return SendMouseMoveImpl(screen_x, screen_y, task); } - virtual bool SendMouseEvents(MouseButton type, int state) { + bool SendMouseEvents(MouseButton type, int state) override { return SendMouseEventsImpl(type, state, base::Closure()); } - virtual bool SendMouseEventsNotifyWhenDone(MouseButton type, - int state, - const base::Closure& task) { + bool SendMouseEventsNotifyWhenDone(MouseButton type, + int state, + const base::Closure& task) override { return SendMouseEventsImpl(type, state, task); } - virtual bool SendMouseClick(MouseButton type) { + bool SendMouseClick(MouseButton type) override { return SendMouseEvents(type, UP | DOWN); } - virtual void RunClosureAfterAllPendingUIEvents(const base::Closure& closure) { + void RunClosureAfterAllPendingUIEvents( + const base::Closure& closure) override { // On windows, posting UI events is synchronous so just post the closure. base::MessageLoopForUI::current()->PostTask(FROM_HERE, closure); } diff --git a/ui/aura/window_tree_host_win.h b/ui/aura/window_tree_host_win.h index a448a3f..8399c8e 100644 --- a/ui/aura/window_tree_host_win.h +++ b/ui/aura/window_tree_host_win.h @@ -21,40 +21,39 @@ class AURA_EXPORT WindowTreeHostWin public NON_EXPORTED_BASE(ui::PlatformWindowDelegate) { public: explicit WindowTreeHostWin(const gfx::Rect& bounds); - virtual ~WindowTreeHostWin(); + ~WindowTreeHostWin() override; // WindowTreeHost: - virtual ui::EventSource* GetEventSource() override; - virtual gfx::AcceleratedWidget GetAcceleratedWidget() override; - virtual void Show() override; - virtual void Hide() override; - virtual gfx::Rect GetBounds() const override; - virtual void SetBounds(const gfx::Rect& bounds) override; - virtual gfx::Point GetLocationOnNativeScreen() const override; - virtual void SetCapture() override; - virtual void ReleaseCapture() override; - virtual void SetCursorNative(gfx::NativeCursor cursor) override; - virtual void MoveCursorToNative(const gfx::Point& location) override; - virtual void OnCursorVisibilityChangedNative(bool show) override; + ui::EventSource* GetEventSource() override; + gfx::AcceleratedWidget GetAcceleratedWidget() override; + void Show() override; + void Hide() override; + gfx::Rect GetBounds() const override; + void SetBounds(const gfx::Rect& bounds) override; + gfx::Point GetLocationOnNativeScreen() const override; + void SetCapture() override; + void ReleaseCapture() override; + void SetCursorNative(gfx::NativeCursor cursor) override; + void MoveCursorToNative(const gfx::Point& location) override; + void OnCursorVisibilityChangedNative(bool show) override; // ui::EventSource: - virtual ui::EventProcessor* GetEventProcessor() override; + ui::EventProcessor* GetEventProcessor() override; protected: gfx::AcceleratedWidget hwnd() const { return widget_; } private: // ui::PlatformWindowDelegate: - virtual void OnBoundsChanged(const gfx::Rect& new_bounds) override; - virtual void OnDamageRect(const gfx::Rect& damaged_region) override; - virtual void DispatchEvent(ui::Event* event) override; - virtual void OnCloseRequest() override; - virtual void OnClosed() override; - virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override; - virtual void OnLostCapture() override; - virtual void OnAcceleratedWidgetAvailable( - gfx::AcceleratedWidget widget) override; - virtual void OnActivationChanged(bool active) override; + void OnBoundsChanged(const gfx::Rect& new_bounds) override; + void OnDamageRect(const gfx::Rect& damaged_region) override; + void DispatchEvent(ui::Event* event) override; + void OnCloseRequest() override; + void OnClosed() override; + void OnWindowStateChanged(ui::PlatformWindowState new_state) override; + void OnLostCapture() override; + void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; + void OnActivationChanged(bool active) override; bool has_capture_; gfx::Rect bounds_; diff --git a/ui/compositor/test/test_compositor_host_win.cc b/ui/compositor/test/test_compositor_host_win.cc index e89d092..3cdd283 100644 --- a/ui/compositor/test/test_compositor_host_win.cc +++ b/ui/compositor/test/test_compositor_host_win.cc @@ -24,17 +24,11 @@ class TestCompositorHostWin : public TestCompositorHost, compositor_->SetScaleAndSize(1.0f, GetSize()); } - virtual ~TestCompositorHostWin() { - DestroyWindow(hwnd()); - } + ~TestCompositorHostWin() override { DestroyWindow(hwnd()); } // Overridden from TestCompositorHost: - virtual void Show() override { - ShowWindow(hwnd(), SW_SHOWNORMAL); - } - virtual ui::Compositor* GetCompositor() override { - return compositor_.get(); - } + void Show() override { ShowWindow(hwnd(), SW_SHOWNORMAL); } + ui::Compositor* GetCompositor() override { return compositor_.get(); } private: CR_BEGIN_MSG_MAP_EX(TestCompositorHostWin) diff --git a/ui/gl/gl_context_wgl.h b/ui/gl/gl_context_wgl.h index d97e568..7a0a437 100644 --- a/ui/gl/gl_context_wgl.h +++ b/ui/gl/gl_context_wgl.h @@ -18,18 +18,18 @@ class GLSurface; class GLContextWGL : public GLContextReal { public: explicit GLContextWGL(GLShareGroup* share_group); - virtual ~GLContextWGL(); + ~GLContextWGL() override; // Implement GLContext. - virtual bool Initialize( - GLSurface* compatible_surface, GpuPreference gpu_preference); - virtual void Destroy(); - virtual bool MakeCurrent(GLSurface* surface); - virtual void ReleaseCurrent(GLSurface* surface); - virtual bool IsCurrent(GLSurface* surface); - virtual void* GetHandle(); - virtual void OnSetSwapInterval(int interval); - virtual std::string GetExtensions(); + bool Initialize(GLSurface* compatible_surface, + GpuPreference gpu_preference) override; + void Destroy() override; + bool MakeCurrent(GLSurface* surface) override; + void ReleaseCurrent(GLSurface* surface) override; + bool IsCurrent(GLSurface* surface) override; + void* GetHandle() override; + void OnSetSwapInterval(int interval) override; + std::string GetExtensions() override; private: HGLRC context_; diff --git a/ui/gl/gl_surface_wgl.h b/ui/gl/gl_surface_wgl.h index aa32047..b65fad2 100644 --- a/ui/gl/gl_surface_wgl.h +++ b/ui/gl/gl_surface_wgl.h @@ -14,10 +14,10 @@ namespace gfx { class GLSurfaceWGL : public GLSurface { public: GLSurfaceWGL(); - virtual ~GLSurfaceWGL(); + ~GLSurfaceWGL() override; // Implement GLSurface. - virtual void* GetDisplay(); + void* GetDisplay() override; static bool InitializeOneOff(); static HDC GetDisplayDC(); @@ -30,15 +30,15 @@ class GLSurfaceWGL : public GLSurface { class NativeViewGLSurfaceWGL : public GLSurfaceWGL { public: explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window); - virtual ~NativeViewGLSurfaceWGL(); + ~NativeViewGLSurfaceWGL() override; // Implement GLSurface. - virtual bool Initialize(); - virtual void Destroy(); - virtual bool IsOffscreen(); - virtual bool SwapBuffers(); - virtual gfx::Size GetSize(); - virtual void* GetHandle(); + bool Initialize() override; + void Destroy() override; + bool IsOffscreen() override; + bool SwapBuffers() override; + gfx::Size GetSize() override; + void* GetHandle() override; private: gfx::AcceleratedWidget window_; @@ -53,15 +53,15 @@ class NativeViewGLSurfaceWGL : public GLSurfaceWGL { class PbufferGLSurfaceWGL : public GLSurfaceWGL { public: explicit PbufferGLSurfaceWGL(const gfx::Size& size); - virtual ~PbufferGLSurfaceWGL(); + ~PbufferGLSurfaceWGL() override; // Implement GLSurface. - virtual bool Initialize(); - virtual void Destroy(); - virtual bool IsOffscreen(); - virtual bool SwapBuffers(); - virtual gfx::Size GetSize(); - virtual void* GetHandle(); + bool Initialize() override; + void Destroy() override; + bool IsOffscreen() override; + bool SwapBuffers() override; + gfx::Size GetSize() override; + void* GetHandle() override; private: gfx::Size size_; diff --git a/ui/gl/gl_surface_win.cc b/ui/gl/gl_surface_win.cc index ed2958e..8d55009 100644 --- a/ui/gl/gl_surface_win.cc +++ b/ui/gl/gl_surface_win.cc @@ -33,15 +33,15 @@ namespace gfx { class NativeViewGLSurfaceOSMesa : public GLSurfaceOSMesa { public: explicit NativeViewGLSurfaceOSMesa(gfx::AcceleratedWidget window); - virtual ~NativeViewGLSurfaceOSMesa(); + ~NativeViewGLSurfaceOSMesa() override; // Implement subset of GLSurface. - virtual bool Initialize() override; - virtual void Destroy() override; - virtual bool IsOffscreen() override; - virtual bool SwapBuffers() override; - virtual bool SupportsPostSubBuffer() override; - virtual bool PostSubBuffer(int x, int y, int width, int height) override; + bool Initialize() override; + void Destroy() override; + bool IsOffscreen() override; + bool SwapBuffers() override; + bool SupportsPostSubBuffer() override; + bool PostSubBuffer(int x, int y, int width, int height) override; private: gfx::AcceleratedWidget window_; @@ -58,9 +58,9 @@ class WinVSyncProvider : public VSyncProvider { use_dwm_ = (base::win::GetVersion() >= base::win::VERSION_WIN7); } - virtual ~WinVSyncProvider() {} + ~WinVSyncProvider() override {} - virtual void GetVSyncParameters(const UpdateVSyncCallback& callback) { + void GetVSyncParameters(const UpdateVSyncCallback& callback) override { TRACE_EVENT0("gpu", "WinVSyncProvider::GetVSyncParameters"); base::TimeTicks timebase; diff --git a/ui/gl/gl_wgl_api_implementation.h b/ui/gl/gl_wgl_api_implementation.h index dbef51a..b4da117 100644 --- a/ui/gl/gl_wgl_api_implementation.h +++ b/ui/gl/gl_wgl_api_implementation.h @@ -28,7 +28,7 @@ class GL_EXPORT WGLApiBase : public WGLApi { protected: WGLApiBase(); - virtual ~WGLApiBase(); + ~WGLApiBase() override; void InitializeBase(DriverWGL* driver); DriverWGL* driver_; @@ -37,7 +37,7 @@ class GL_EXPORT WGLApiBase : public WGLApi { class GL_EXPORT RealWGLApi : public WGLApiBase { public: RealWGLApi(); - virtual ~RealWGLApi(); + ~RealWGLApi() override; void Initialize(DriverWGL* driver); }; @@ -45,7 +45,7 @@ class GL_EXPORT RealWGLApi : public WGLApiBase { class GL_EXPORT TraceWGLApi : public WGLApi { public: TraceWGLApi(WGLApi* wgl_api) : wgl_api_(wgl_api) { } - virtual ~TraceWGLApi(); + ~TraceWGLApi() override; // Include the auto-generated part of this class. We split this because // it means we can easily edit the non-auto generated parts right here in diff --git a/ui/native_theme/native_theme_aurawin.h b/ui/native_theme/native_theme_aurawin.h index 7c7e57d..11bb87d 100644 --- a/ui/native_theme/native_theme_aurawin.h +++ b/ui/native_theme/native_theme_aurawin.h @@ -18,17 +18,17 @@ class NATIVE_THEME_EXPORT NativeThemeAuraWin : public NativeThemeAura { private: NativeThemeAuraWin(); - virtual ~NativeThemeAuraWin(); + ~NativeThemeAuraWin() override; // Overridden from NativeThemeBase: - virtual gfx::Size GetPartSize(Part part, - State state, - const ExtraParams& extra) const override; - virtual void Paint(SkCanvas* canvas, - Part part, - State state, - const gfx::Rect& rect, - const ExtraParams& extra) const override; + gfx::Size GetPartSize(Part part, + State state, + const ExtraParams& extra) const override; + void Paint(SkCanvas* canvas, + Part part, + State state, + const gfx::Rect& rect, + const ExtraParams& extra) const override; DISALLOW_COPY_AND_ASSIGN(NativeThemeAuraWin); }; diff --git a/ui/native_theme/native_theme_win.h b/ui/native_theme/native_theme_win.h index 24b718f..46b62ae 100644 --- a/ui/native_theme/native_theme_win.h +++ b/ui/native_theme/native_theme_win.h @@ -104,22 +104,22 @@ class NATIVE_THEME_EXPORT NativeThemeWin : public NativeTheme, bool draw_edges) const; // NativeTheme implementation: - virtual gfx::Size GetPartSize(Part part, - State state, - const ExtraParams& extra) const override; - virtual void Paint(SkCanvas* canvas, - Part part, - State state, - const gfx::Rect& rect, - const ExtraParams& extra) const override; - virtual SkColor GetSystemColor(ColorId color_id) const override; + gfx::Size GetPartSize(Part part, + State state, + const ExtraParams& extra) const override; + void Paint(SkCanvas* canvas, + Part part, + State state, + const gfx::Rect& rect, + const ExtraParams& extra) const override; + SkColor GetSystemColor(ColorId color_id) const override; private: NativeThemeWin(); - ~NativeThemeWin(); + ~NativeThemeWin() override; // gfx::SysColorChangeListener implementation: - virtual void OnSysColorChange() override; + void OnSysColorChange() override; // Update the locally cached set of system colors. void UpdateSystemColors(); diff --git a/ui/platform_window/win/win_window.h b/ui/platform_window/win/win_window.h index 12aa7ad..8fb8adc 100644 --- a/ui/platform_window/win/win_window.h +++ b/ui/platform_window/win/win_window.h @@ -16,26 +16,26 @@ class WIN_WINDOW_EXPORT WinWindow : public NON_EXPORTED_BASE(PlatformWindow), public gfx::WindowImpl { public: WinWindow(PlatformWindowDelegate* delegate, const gfx::Rect& bounds); - virtual ~WinWindow(); + ~WinWindow() override; private: void Destroy(); // PlatformWindow: - virtual void Show() override; - virtual void Hide() override; - virtual void Close() override; - virtual void SetBounds(const gfx::Rect& bounds) override; - virtual gfx::Rect GetBounds() override; - virtual void SetCapture() override; - virtual void ReleaseCapture() override; - virtual void ToggleFullscreen() override; - virtual void Maximize() override; - virtual void Minimize() override; - virtual void Restore() override; - virtual void SetCursor(PlatformCursor cursor) override; - virtual void MoveCursorTo(const gfx::Point& location) override; - virtual void ConfineCursorToBounds(const gfx::Rect& bounds) override; + void Show() override; + void Hide() override; + void Close() override; + void SetBounds(const gfx::Rect& bounds) override; + gfx::Rect GetBounds() override; + void SetCapture() override; + void ReleaseCapture() override; + void ToggleFullscreen() override; + void Maximize() override; + void Minimize() override; + void Restore() override; + void SetCursor(PlatformCursor cursor) override; + void MoveCursorTo(const gfx::Point& location) override; + void ConfineCursorToBounds(const gfx::Rect& bounds) override; CR_BEGIN_MSG_MAP_EX(WinWindow) CR_MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange) diff --git a/ui/views/accessibility/native_view_accessibility_win.h b/ui/views/accessibility/native_view_accessibility_win.h index 087d50e7..dadbcba 100644 --- a/ui/views/accessibility/native_view_accessibility_win.h +++ b/ui/views/accessibility/native_view_accessibility_win.h @@ -13,7 +13,7 @@ namespace views { class NativeViewAccessibilityWin : public NativeViewAccessibility { public: NativeViewAccessibilityWin(View* view); - virtual ~NativeViewAccessibilityWin(); + ~NativeViewAccessibilityWin() override; // NativeViewAccessibility. gfx::NativeViewAccessible GetParent() override; diff --git a/ui/views/accessibility/native_view_accessibility_win_unittest.cc b/ui/views/accessibility/native_view_accessibility_win_unittest.cc index 2eba9cb..3b955b2 100644 --- a/ui/views/accessibility/native_view_accessibility_win_unittest.cc +++ b/ui/views/accessibility/native_view_accessibility_win_unittest.cc @@ -22,7 +22,7 @@ namespace test { class NativeViewAcccessibilityWinTest : public ViewsTestBase { public: NativeViewAcccessibilityWinTest() {} - virtual ~NativeViewAcccessibilityWinTest() {} + ~NativeViewAcccessibilityWinTest() override {} protected: void GetIAccessible2InterfaceForView(View* view, IAccessible2_2** result) { diff --git a/ui/views/controls/menu/menu_message_pump_dispatcher_win.h b/ui/views/controls/menu/menu_message_pump_dispatcher_win.h index 9f84171..afc54fe 100644 --- a/ui/views/controls/menu/menu_message_pump_dispatcher_win.h +++ b/ui/views/controls/menu/menu_message_pump_dispatcher_win.h @@ -19,11 +19,11 @@ namespace internal { class MenuMessagePumpDispatcher : public base::MessagePumpDispatcher { public: explicit MenuMessagePumpDispatcher(MenuController* menu_controller); - virtual ~MenuMessagePumpDispatcher(); + ~MenuMessagePumpDispatcher() override; private: // base::MessagePumpDispatcher: - virtual uint32_t Dispatch(const base::NativeEvent& event) override; + uint32_t Dispatch(const base::NativeEvent& event) override; MenuController* menu_controller_; diff --git a/ui/views/controls/menu/native_menu_win.h b/ui/views/controls/menu/native_menu_win.h index 39dc37e20..7d4dea9 100644 --- a/ui/views/controls/menu/native_menu_win.h +++ b/ui/views/controls/menu/native_menu_win.h @@ -30,18 +30,18 @@ class VIEWS_EXPORT NativeMenuWin : public MenuWrapper { // is non-NULL, the NativeMenuWin wraps the system menu for that window. // The caller owns the model and the delegate. NativeMenuWin(ui::MenuModel* model, HWND system_menu_for); - virtual ~NativeMenuWin(); + ~NativeMenuWin() override; // Overridden from MenuWrapper: - virtual void RunMenuAt(const gfx::Point& point, int alignment) override; - virtual void CancelMenu() override; - virtual void Rebuild(MenuInsertionDelegateWin* delegate) override; - virtual void UpdateStates() override; - virtual HMENU GetNativeMenu() const override; - virtual MenuAction GetMenuAction() const override; - virtual void AddMenuListener(MenuListener* listener) override; - virtual void RemoveMenuListener(MenuListener* listener) override; - virtual void SetMinimumWidth(int width) override; + void RunMenuAt(const gfx::Point& point, int alignment) override; + void CancelMenu() override; + void Rebuild(MenuInsertionDelegateWin* delegate) override; + void UpdateStates() override; + HMENU GetNativeMenu() const override; + MenuAction GetMenuAction() const override; + void AddMenuListener(MenuListener* listener) override; + void RemoveMenuListener(MenuListener* listener) override; + void SetMinimumWidth(int width) override; private: // IMPORTANT: Note about indices. diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h index c46e242..4cc0e8a 100644 --- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h +++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h @@ -24,22 +24,19 @@ class VIEWS_EXPORT DesktopDragDropClientWin : public aura::client::DragDropClient { public: DesktopDragDropClientWin(aura::Window* root_window, HWND window); - virtual ~DesktopDragDropClientWin(); + ~DesktopDragDropClientWin() override; // Overridden from aura::client::DragDropClient: - virtual int StartDragAndDrop( - const ui::OSExchangeData& data, - aura::Window* root_window, - aura::Window* source_window, - const gfx::Point& screen_location, - int operation, - ui::DragDropTypes::DragEventSource source) override; - virtual void DragUpdate(aura::Window* target, - const ui::LocatedEvent& event) override; - virtual void Drop(aura::Window* target, - const ui::LocatedEvent& event) override; - virtual void DragCancel() override; - virtual bool IsDragDropInProgress() override; + int StartDragAndDrop(const ui::OSExchangeData& data, + aura::Window* root_window, + aura::Window* source_window, + const gfx::Point& screen_location, + int operation, + ui::DragDropTypes::DragEventSource source) override; + void DragUpdate(aura::Window* target, const ui::LocatedEvent& event) override; + void Drop(aura::Window* target, const ui::LocatedEvent& event) override; + void DragCancel() override; + bool IsDragDropInProgress() override; void OnNativeWidgetDestroying(HWND window); diff --git a/ui/views/widget/desktop_aura/desktop_drop_target_win.h b/ui/views/widget/desktop_aura/desktop_drop_target_win.h index d376182..73dc15f 100644 --- a/ui/views/widget/desktop_aura/desktop_drop_target_win.h +++ b/ui/views/widget/desktop_aura/desktop_drop_target_win.h @@ -29,26 +29,26 @@ class DesktopDropTargetWin : public ui::DropTargetWin, public aura::WindowObserver { public: DesktopDropTargetWin(aura::Window* root_window, HWND window); - virtual ~DesktopDropTargetWin(); + ~DesktopDropTargetWin() override; private: // ui::DropTargetWin implementation: - virtual DWORD OnDragEnter(IDataObject* data_object, - DWORD key_state, - POINT position, - DWORD effect) override; - virtual DWORD OnDragOver(IDataObject* data_object, - DWORD key_state, - POINT position, - DWORD effect) override; - virtual void OnDragLeave(IDataObject* data_object) override; - virtual DWORD OnDrop(IDataObject* data_object, - DWORD key_state, - POINT position, - DWORD effect) override; + DWORD OnDragEnter(IDataObject* data_object, + DWORD key_state, + POINT position, + DWORD effect) override; + DWORD OnDragOver(IDataObject* data_object, + DWORD key_state, + POINT position, + DWORD effect) override; + void OnDragLeave(IDataObject* data_object) override; + DWORD OnDrop(IDataObject* data_object, + DWORD key_state, + POINT position, + DWORD effect) override; // aura::WindowObserver implementation: - virtual void OnWindowDestroyed(aura::Window* window) override; + void OnWindowDestroyed(aura::Window* window) override; // Common functionality for the ui::DropTargetWin methods to translate from // COM data types to Aura ones. diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.h b/ui/views/widget/desktop_aura/desktop_screen_win.h index 59776a6..16357a3 100644 --- a/ui/views/widget/desktop_aura/desktop_screen_win.h +++ b/ui/views/widget/desktop_aura/desktop_screen_win.h @@ -13,14 +13,13 @@ namespace views { class VIEWS_EXPORT DesktopScreenWin : public gfx::ScreenWin { public: DesktopScreenWin(); - virtual ~DesktopScreenWin(); + ~DesktopScreenWin() override; private: // Overridden from gfx::ScreenWin: - virtual gfx::Display GetDisplayMatching( - const gfx::Rect& match_rect) const override; - virtual HWND GetHWNDFromNativeView(gfx::NativeView window) const override; - virtual gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const override; + gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; + HWND GetHWNDFromNativeView(gfx::NativeView window) const override; + gfx::NativeWindow GetNativeWindowFromHWND(HWND hwnd) const override; DISALLOW_COPY_AND_ASSIGN(DesktopScreenWin); }; diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h index 8e8aec2..6e32fc7 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -38,170 +38,165 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin DesktopWindowTreeHostWin( internal::NativeWidgetDelegate* native_widget_delegate, DesktopNativeWidgetAura* desktop_native_widget_aura); - virtual ~DesktopWindowTreeHostWin(); + ~DesktopWindowTreeHostWin() override; // A way of converting an HWND into a content window. static aura::Window* GetContentWindowForHWND(HWND hwnd); protected: // Overridden from DesktopWindowTreeHost: - virtual void Init(aura::Window* content_window, - const Widget::InitParams& params) override; - virtual void OnNativeWidgetCreated(const Widget::InitParams& params) override; - virtual scoped_ptr<corewm::Tooltip> CreateTooltip() override; - virtual scoped_ptr<aura::client::DragDropClient> - CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) override; - virtual void Close() override; - virtual void CloseNow() override; - virtual aura::WindowTreeHost* AsWindowTreeHost() override; - virtual void ShowWindowWithState(ui::WindowShowState show_state) override; - virtual void ShowMaximizedWithBounds( - const gfx::Rect& restored_bounds) override; - virtual bool IsVisible() const override; - virtual void SetSize(const gfx::Size& size) override; - virtual void StackAtTop() override; - virtual void CenterWindow(const gfx::Size& size) override; - virtual void GetWindowPlacement( - gfx::Rect* bounds, - ui::WindowShowState* show_state) const override; - virtual gfx::Rect GetWindowBoundsInScreen() const override; - virtual gfx::Rect GetClientAreaBoundsInScreen() const override; - virtual gfx::Rect GetRestoredBounds() const override; - virtual gfx::Rect GetWorkAreaBoundsInScreen() const override; - virtual void SetShape(gfx::NativeRegion native_region) override; - virtual void Activate() override; - virtual void Deactivate() override; - virtual bool IsActive() const override; - virtual void Maximize() override; - virtual void Minimize() override; - virtual void Restore() override; - virtual bool IsMaximized() const override; - virtual bool IsMinimized() const override; - virtual bool HasCapture() const override; - virtual void SetAlwaysOnTop(bool always_on_top) override; - virtual bool IsAlwaysOnTop() const override; - virtual void SetVisibleOnAllWorkspaces(bool always_visible) override; - virtual bool SetWindowTitle(const base::string16& title) override; - virtual void ClearNativeFocus() override; - virtual Widget::MoveLoopResult RunMoveLoop( + void Init(aura::Window* content_window, + const Widget::InitParams& params) override; + void OnNativeWidgetCreated(const Widget::InitParams& params) override; + scoped_ptr<corewm::Tooltip> CreateTooltip() override; + scoped_ptr<aura::client::DragDropClient> CreateDragDropClient( + DesktopNativeCursorManager* cursor_manager) override; + void Close() override; + void CloseNow() override; + aura::WindowTreeHost* AsWindowTreeHost() override; + void ShowWindowWithState(ui::WindowShowState show_state) override; + void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override; + bool IsVisible() const override; + void SetSize(const gfx::Size& size) override; + void StackAtTop() override; + void CenterWindow(const gfx::Size& size) override; + void GetWindowPlacement(gfx::Rect* bounds, + ui::WindowShowState* show_state) const override; + gfx::Rect GetWindowBoundsInScreen() const override; + gfx::Rect GetClientAreaBoundsInScreen() const override; + gfx::Rect GetRestoredBounds() const override; + gfx::Rect GetWorkAreaBoundsInScreen() const override; + void SetShape(gfx::NativeRegion native_region) override; + void Activate() override; + void Deactivate() override; + bool IsActive() const override; + void Maximize() override; + void Minimize() override; + void Restore() override; + bool IsMaximized() const override; + bool IsMinimized() const override; + bool HasCapture() const override; + void SetAlwaysOnTop(bool always_on_top) override; + bool IsAlwaysOnTop() const override; + void SetVisibleOnAllWorkspaces(bool always_visible) override; + bool SetWindowTitle(const base::string16& title) override; + void ClearNativeFocus() override; + Widget::MoveLoopResult RunMoveLoop( const gfx::Vector2d& drag_offset, Widget::MoveLoopSource source, Widget::MoveLoopEscapeBehavior escape_behavior) override; - virtual void EndMoveLoop() override; - virtual void SetVisibilityChangedAnimationsEnabled(bool value) override; - virtual bool ShouldUseNativeFrame() const override; - virtual bool ShouldWindowContentsBeTransparent() const override; - virtual void FrameTypeChanged() override; - virtual void SetFullscreen(bool fullscreen) override; - virtual bool IsFullscreen() const override; - virtual void SetOpacity(unsigned char opacity) override; - virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, - const gfx::ImageSkia& app_icon) override; - virtual void InitModalType(ui::ModalType modal_type) override; - virtual void FlashFrame(bool flash_frame) override; - virtual void OnRootViewLayout() override; - virtual void OnNativeWidgetFocus() override; - virtual void OnNativeWidgetBlur() override; - virtual bool IsAnimatingClosed() const override; - virtual bool IsTranslucentWindowOpacitySupported() const override; - virtual void SizeConstraintsChanged() override; + void EndMoveLoop() override; + void SetVisibilityChangedAnimationsEnabled(bool value) override; + bool ShouldUseNativeFrame() const override; + bool ShouldWindowContentsBeTransparent() const override; + void FrameTypeChanged() override; + void SetFullscreen(bool fullscreen) override; + bool IsFullscreen() const override; + void SetOpacity(unsigned char opacity) override; + void SetWindowIcons(const gfx::ImageSkia& window_icon, + const gfx::ImageSkia& app_icon) override; + void InitModalType(ui::ModalType modal_type) override; + void FlashFrame(bool flash_frame) override; + void OnRootViewLayout() override; + void OnNativeWidgetFocus() override; + void OnNativeWidgetBlur() override; + bool IsAnimatingClosed() const override; + bool IsTranslucentWindowOpacitySupported() const override; + void SizeConstraintsChanged() override; // Overridden from aura::WindowTreeHost: - virtual ui::EventSource* GetEventSource() override; - virtual gfx::AcceleratedWidget GetAcceleratedWidget() override; - virtual void Show() override; - virtual void Hide() override; - virtual gfx::Rect GetBounds() const override; - virtual void SetBounds(const gfx::Rect& bounds) override; - virtual gfx::Point GetLocationOnNativeScreen() const override; - virtual void SetCapture() override; - virtual void ReleaseCapture() override; - virtual void SetCursorNative(gfx::NativeCursor cursor) override; - virtual void OnCursorVisibilityChangedNative(bool show) override; - virtual void MoveCursorToNative(const gfx::Point& location) override; + ui::EventSource* GetEventSource() override; + gfx::AcceleratedWidget GetAcceleratedWidget() override; + void Show() override; + void Hide() override; + gfx::Rect GetBounds() const override; + void SetBounds(const gfx::Rect& bounds) override; + gfx::Point GetLocationOnNativeScreen() const override; + void SetCapture() override; + void ReleaseCapture() override; + void SetCursorNative(gfx::NativeCursor cursor) override; + void OnCursorVisibilityChangedNative(bool show) override; + void MoveCursorToNative(const gfx::Point& location) override; // Overridden frm ui::EventSource - virtual ui::EventProcessor* GetEventProcessor() override; + ui::EventProcessor* GetEventProcessor() override; // Overridden from aura::client::AnimationHost - virtual void SetHostTransitionOffsets( + void SetHostTransitionOffsets( const gfx::Vector2d& top_left_delta, const gfx::Vector2d& bottom_right_delta) override; - virtual void OnWindowHidingAnimationCompleted() override; + void OnWindowHidingAnimationCompleted() override; // Overridden from HWNDMessageHandlerDelegate: - virtual bool IsWidgetWindow() const override; - virtual bool IsUsingCustomFrame() const override; - virtual void SchedulePaint() override; - virtual void EnableInactiveRendering() override; - virtual bool IsInactiveRenderingDisabled() override; - virtual bool CanResize() const override; - virtual bool CanMaximize() const override; - virtual bool CanMinimize() const override; - virtual bool CanActivate() const override; - virtual bool WidgetSizeIsClientSize() const override; - virtual bool IsModal() const override; - virtual int GetInitialShowState() const override; - virtual bool WillProcessWorkAreaChange() const override; - virtual int GetNonClientComponent(const gfx::Point& point) const override; - virtual void GetWindowMask(const gfx::Size& size, gfx::Path* path) override; - virtual bool GetClientAreaInsets(gfx::Insets* insets) const override; - virtual void GetMinMaxSize(gfx::Size* min_size, - gfx::Size* max_size) const override; - virtual gfx::Size GetRootViewSize() const override; - virtual void ResetWindowControls() override; - virtual void PaintLayeredWindow(gfx::Canvas* canvas) override; - virtual gfx::NativeViewAccessible GetNativeViewAccessible() override; - virtual bool ShouldHandleSystemCommands() const override; - virtual InputMethod* GetInputMethod() override; - virtual void HandleAppDeactivated() override; - virtual void HandleActivationChanged(bool active) override; - virtual bool HandleAppCommand(short command) override; - virtual void HandleCancelMode() override; - virtual void HandleCaptureLost() override; - virtual void HandleClose() override; - virtual bool HandleCommand(int command) override; - virtual void HandleAccelerator(const ui::Accelerator& accelerator) override; - virtual void HandleCreate() override; - virtual void HandleDestroying() override; - virtual void HandleDestroyed() override; - virtual bool HandleInitialFocus(ui::WindowShowState show_state) override; - virtual void HandleDisplayChange() override; - virtual void HandleBeginWMSizeMove() override; - virtual void HandleEndWMSizeMove() override; - virtual void HandleMove() override; - virtual void HandleWorkAreaChanged() override; - virtual void HandleVisibilityChanging(bool visible) override; - virtual void HandleVisibilityChanged(bool visible) override; - virtual void HandleClientSizeChanged(const gfx::Size& new_size) override; - virtual void HandleFrameChanged() override; - virtual void HandleNativeFocus(HWND last_focused_window) override; - virtual void HandleNativeBlur(HWND focused_window) override; - virtual bool HandleMouseEvent(const ui::MouseEvent& event) override; - virtual bool HandleKeyEvent(const ui::KeyEvent& event) override; - virtual bool HandleUntranslatedKeyEvent(const ui::KeyEvent& event) override; - virtual void HandleTouchEvent(const ui::TouchEvent& event) override; - virtual bool HandleIMEMessage(UINT message, - WPARAM w_param, - LPARAM l_param, - LRESULT* result) override; - virtual void HandleInputLanguageChange(DWORD character_set, - HKL input_language_id) override; - virtual bool HandlePaintAccelerated(const gfx::Rect& invalid_rect) override; - virtual void HandlePaint(gfx::Canvas* canvas) override; - virtual bool HandleTooltipNotify(int w_param, - NMHDR* l_param, - LRESULT* l_result) override; - virtual void HandleMenuLoop(bool in_menu_loop) override; - virtual bool PreHandleMSG(UINT message, - WPARAM w_param, - LPARAM l_param, - LRESULT* result) override; - virtual void PostHandleMSG(UINT message, - WPARAM w_param, - LPARAM l_param) override; - virtual bool HandleScrollEvent(const ui::ScrollEvent& event) override; - virtual void HandleWindowSizeChanging() override; + bool IsWidgetWindow() const override; + bool IsUsingCustomFrame() const override; + void SchedulePaint() override; + void EnableInactiveRendering() override; + bool IsInactiveRenderingDisabled() override; + bool CanResize() const override; + bool CanMaximize() const override; + bool CanMinimize() const override; + bool CanActivate() const override; + bool WidgetSizeIsClientSize() const override; + bool IsModal() const override; + int GetInitialShowState() const override; + bool WillProcessWorkAreaChange() const override; + int GetNonClientComponent(const gfx::Point& point) const override; + void GetWindowMask(const gfx::Size& size, gfx::Path* path) override; + bool GetClientAreaInsets(gfx::Insets* insets) const override; + void GetMinMaxSize(gfx::Size* min_size, gfx::Size* max_size) const override; + gfx::Size GetRootViewSize() const override; + void ResetWindowControls() override; + void PaintLayeredWindow(gfx::Canvas* canvas) override; + gfx::NativeViewAccessible GetNativeViewAccessible() override; + bool ShouldHandleSystemCommands() const override; + InputMethod* GetInputMethod() override; + void HandleAppDeactivated() override; + void HandleActivationChanged(bool active) override; + bool HandleAppCommand(short command) override; + void HandleCancelMode() override; + void HandleCaptureLost() override; + void HandleClose() override; + bool HandleCommand(int command) override; + void HandleAccelerator(const ui::Accelerator& accelerator) override; + void HandleCreate() override; + void HandleDestroying() override; + void HandleDestroyed() override; + bool HandleInitialFocus(ui::WindowShowState show_state) override; + void HandleDisplayChange() override; + void HandleBeginWMSizeMove() override; + void HandleEndWMSizeMove() override; + void HandleMove() override; + void HandleWorkAreaChanged() override; + void HandleVisibilityChanging(bool visible) override; + void HandleVisibilityChanged(bool visible) override; + void HandleClientSizeChanged(const gfx::Size& new_size) override; + void HandleFrameChanged() override; + void HandleNativeFocus(HWND last_focused_window) override; + void HandleNativeBlur(HWND focused_window) override; + bool HandleMouseEvent(const ui::MouseEvent& event) override; + bool HandleKeyEvent(const ui::KeyEvent& event) override; + bool HandleUntranslatedKeyEvent(const ui::KeyEvent& event) override; + void HandleTouchEvent(const ui::TouchEvent& event) override; + bool HandleIMEMessage(UINT message, + WPARAM w_param, + LPARAM l_param, + LRESULT* result) override; + void HandleInputLanguageChange(DWORD character_set, + HKL input_language_id) override; + bool HandlePaintAccelerated(const gfx::Rect& invalid_rect) override; + void HandlePaint(gfx::Canvas* canvas) override; + bool HandleTooltipNotify(int w_param, + NMHDR* l_param, + LRESULT* l_result) override; + void HandleMenuLoop(bool in_menu_loop) override; + bool PreHandleMSG(UINT message, + WPARAM w_param, + LPARAM l_param, + LRESULT* result) override; + void PostHandleMSG(UINT message, WPARAM w_param, LPARAM l_param) override; + bool HandleScrollEvent(const ui::ScrollEvent& event) override; + void HandleWindowSizeChanging() override; Widget* GetWidget(); const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h index b7db7f2..a966eae 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h @@ -115,7 +115,7 @@ class VIEWS_EXPORT HWNDMessageHandler : public ui::WindowEventTarget { public: explicit HWNDMessageHandler(HWNDMessageHandlerDelegate* delegate); - ~HWNDMessageHandler(); + ~HWNDMessageHandler() override; void Init(HWND parent, const gfx::Rect& bounds); void InitModalType(ui::ModalType modal_type); @@ -212,38 +212,36 @@ class VIEWS_EXPORT HWNDMessageHandler : typedef std::set<DWORD> TouchIDs; // Overridden from internal::InputMethodDelegate: - virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) override; + void DispatchKeyEventPostIME(const ui::KeyEvent& key) override; // Overridden from WindowImpl: - virtual HICON GetDefaultWindowIcon() const override; - virtual HICON GetSmallWindowIcon() const override; - virtual LRESULT OnWndProc(UINT message, - WPARAM w_param, - LPARAM l_param) override; + HICON GetDefaultWindowIcon() const override; + HICON GetSmallWindowIcon() const override; + LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) override; // Overridden from WindowEventTarget - virtual LRESULT HandleMouseMessage(unsigned int message, - WPARAM w_param, - LPARAM l_param, - bool* handled) override; - virtual LRESULT HandleKeyboardMessage(unsigned int message, - WPARAM w_param, - LPARAM l_param, - bool* handled) override; - virtual LRESULT HandleTouchMessage(unsigned int message, - WPARAM w_param, - LPARAM l_param, - bool* handled) override; - - virtual LRESULT HandleScrollMessage(unsigned int message, - WPARAM w_param, - LPARAM l_param, - bool* handled) override; - - virtual LRESULT HandleNcHitTestMessage(unsigned int message, - WPARAM w_param, - LPARAM l_param, - bool* handled) override; + LRESULT HandleMouseMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param, + bool* handled) override; + LRESULT HandleKeyboardMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param, + bool* handled) override; + LRESULT HandleTouchMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param, + bool* handled) override; + + LRESULT HandleScrollMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param, + bool* handled) override; + + LRESULT HandleNcHitTestMessage(unsigned int message, + WPARAM w_param, + LPARAM l_param, + bool* handled) override; // Returns the auto-hide edges of the appbar. See // ViewsDelegate::GetAppbarAutohideEdges() for details. If the edges change, diff --git a/ui/wm/core/nested_accelerator_dispatcher_win.cc b/ui/wm/core/nested_accelerator_dispatcher_win.cc index f3fc5d7..8fa42fe 100644 --- a/ui/wm/core/nested_accelerator_dispatcher_win.cc +++ b/ui/wm/core/nested_accelerator_dispatcher_win.cc @@ -31,16 +31,16 @@ class NestedAcceleratorDispatcherWin : public NestedAcceleratorDispatcher, NestedAcceleratorDispatcherWin(NestedAcceleratorDelegate* delegate, MessagePumpDispatcher* nested) : NestedAcceleratorDispatcher(delegate), nested_dispatcher_(nested) {} - virtual ~NestedAcceleratorDispatcherWin() {} + ~NestedAcceleratorDispatcherWin() override {} private: // NestedAcceleratorDispatcher: - virtual scoped_ptr<base::RunLoop> CreateRunLoop() override { + scoped_ptr<base::RunLoop> CreateRunLoop() override { return make_scoped_ptr(new base::RunLoop(this)); } // MessagePumpDispatcher: - virtual uint32_t Dispatch(const MSG& event) override { + uint32_t Dispatch(const MSG& event) override { if (IsKeyEvent(event)) { ui::KeyEvent key_event(event); ui::Accelerator accelerator = CreateAcceleratorFromKeyEvent(key_event); |