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

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: 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') | ui/aura/root_window_host_linux.cc » ('J')
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..c75c718d7e9f96e884d98c48e982006040d3809d 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 implements
sky 2012/02/15 00:02:04 implements -> overrides
oshima 2012/02/15 00:18:00 Done.
+ 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') | ui/aura/root_window_host_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698