1// Copyright (c) 2012 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/menu_controller.h" 6 7#include "base/run_loop.h" 8#include "ui/gfx/screen.h" 9 10namespace views { 11 12void MenuController::RunMessageLoop(bool nested_menu) { 13 base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); 14 base::MessageLoop::ScopedNestableTaskAllower allow(loop); 15 base::RunLoop run_loop(this); 16 run_loop.Run(); 17} 18 19bool MenuController::ShouldQuitNow() const { 20 return true; 21} 22 23gfx::Screen* MenuController::GetScreen() { 24 return gfx::Screen::GetNativeScreen(); 25} 26 27} // namespace views 28