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

Unified Diff: ash/accelerators/accelerator_dispatcher.h

Issue 9348113: Fix two crash and potential leak&crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert unnecessary file, updated comment Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/accelerators/accelerator_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_dispatcher.h
diff --git a/ash/accelerators/accelerator_dispatcher.h b/ash/accelerators/accelerator_dispatcher.h
index af75f48b88aab239e0d468a939a1734c10eae9c7..209b67dcc2ad011902d237c0536b31b2a1fea17e 100644
--- a/ash/accelerators/accelerator_dispatcher.h
+++ b/ash/accelerators/accelerator_dispatcher.h
@@ -9,6 +9,7 @@
#include "ash/ash_export.h"
#include "base/message_loop.h"
#include "ui/aura/window.h"
+#include "ui/aura/window_observer.h"
namespace ash {
@@ -16,10 +17,12 @@ namespace ash {
// Wraps a nested dispatcher to which control is passed if no accelerator key
// has been pressed.
// TODO(pkotwicz): Port AcceleratorDispatcher to mac.
-class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher {
+class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher,
+ public aura::WindowObserver {
public:
explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher,
aura::Window* associated_window);
+ virtual ~AcceleratorDispatcher();
#if defined(USE_X11)
virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(
@@ -28,6 +31,9 @@ class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher {
bool AcceleratorDispatcher::Dispatch(const MSG& msg) OVERRIDE;
#endif
+ // aura::WindowObserver overrides:
+ virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+
private:
MessageLoop::Dispatcher* nested_dispatcher_;
« no previous file with comments | « no previous file | ash/accelerators/accelerator_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698