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

Side by Side Diff: ui/views/controls/menu/menu_runner_impl_cocoa.h

Issue 1876013002: Fixed potential crash on destroying MenuRunnerImplCocoa. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_
7 7
8 #include "ui/views/controls/menu/menu_runner_impl_interface.h" 8 #include "ui/views/controls/menu/menu_runner_impl_interface.h"
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 21 matching lines...) Expand all
32 int32_t run_types) override; 32 int32_t run_types) override;
33 void Cancel() override; 33 void Cancel() override;
34 base::TimeDelta GetClosingEventTime() const override; 34 base::TimeDelta GetClosingEventTime() const override;
35 35
36 private: 36 private:
37 ~MenuRunnerImplCocoa() override; 37 ~MenuRunnerImplCocoa() override;
38 38
39 // The Cocoa menu controller that this instance is bridging. 39 // The Cocoa menu controller that this instance is bridging.
40 base::scoped_nsobject<MenuController> menu_controller_; 40 base::scoped_nsobject<MenuController> menu_controller_;
41 41
42 // Are we in run waiting for it to return?
43 bool running_;
44
42 // Set if |running_| and Release() has been invoked. 45 // Set if |running_| and Release() has been invoked.
43 bool delete_after_run_; 46 bool delete_after_run_;
44 47
45 // The timestamp of the event which closed the menu - or 0. 48 // The timestamp of the event which closed the menu - or 0.
46 base::TimeDelta closing_event_time_; 49 base::TimeDelta closing_event_time_;
47 50
48 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImplCocoa); 51 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImplCocoa);
49 }; 52 };
50 53
51 } // namespace internal 54 } // namespace internal
52 } // namespace views 55 } // namespace views
53 56
54 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_ 57 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_runner_cocoa_unittest.mm ('k') | ui/views/controls/menu/menu_runner_impl_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698