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

Side by Side Diff: ui/views/controls/menu/nested_dispatcher_gtk.cc

Issue 9728002: Removing deprecated GTK-Views code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/views/controls/menu/nested_dispatcher_gtk.h"
6
7 namespace views {
8
9 NestedDispatcherGtk::NestedDispatcherGtk(MessageLoopForUI::Dispatcher* creator,
10 bool allow_nested_task)
11 : creator_(creator),
12 allow_nested_task_(allow_nested_task) {
13 }
14
15 bool NestedDispatcherGtk::RunAndSelfDestruct() {
16 bool nestable = MessageLoopForUI::current()->NestableTasksAllowed();
17 if (allow_nested_task_)
18 MessageLoopForUI::current()->SetNestableTasksAllowed(true);
19 MessageLoopForUI::current()->RunWithDispatcher(this);
20 if (allow_nested_task_)
21 MessageLoopForUI::current()->SetNestableTasksAllowed(nestable);
22 bool creator_is_deleted = creator_ == NULL;
23 delete this;
24 return creator_is_deleted;
25 }
26
27 void NestedDispatcherGtk::CreatorDestroyed() {
28 creator_ = NULL;
29 }
30
31 bool NestedDispatcherGtk::Dispatch(GdkEvent* event) {
32 return creator_ && creator_->Dispatch(event);
33 }
34
35 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/nested_dispatcher_gtk.h ('k') | ui/views/controls/native/native_view_host_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698