| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/views/native_menu_domui.h" | 5 #include "chrome/browser/chromeos/views/native_menu_domui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "chrome/browser/chromeos/dom_ui/menu_ui.h" | 11 #include "chrome/browser/chromeos/dom_ui/menu_ui.h" |
| 12 #include "chrome/browser/chromeos/views/domui_menu_widget.h" | 12 #include "chrome/browser/chromeos/views/domui_menu_widget.h" |
| 13 #include "chrome/browser/chromeos/views/menu_locator.h" | 13 #include "chrome/browser/chromeos/views/menu_locator.h" |
| 14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
| 15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
| 17 #include "chrome/browser/ui/browser_window.h" | 17 #include "chrome/browser/ui/browser_window.h" |
| 18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
| 19 #include "gfx/rect.h" | |
| 20 #include "ui/base/models/menu_model.h" | 19 #include "ui/base/models/menu_model.h" |
| 20 #include "ui/gfx/rect.h" |
| 21 #include "views/controls/menu/menu_2.h" | 21 #include "views/controls/menu/menu_2.h" |
| 22 #include "views/controls/menu/nested_dispatcher_gtk.h" | 22 #include "views/controls/menu/nested_dispatcher_gtk.h" |
| 23 | 23 |
| 24 #if defined(TOUCH_UI) | 24 #if defined(TOUCH_UI) |
| 25 #include "views/focus/accelerator_handler.h" | 25 #include "views/focus/accelerator_handler.h" |
| 26 #include "views/controls/menu/native_menu_x.h" | 26 #include "views/controls/menu/native_menu_x.h" |
| 27 #else | 27 #else |
| 28 #include "views/controls/menu/native_menu_gtk.h" | 28 #include "views/controls/menu/native_menu_gtk.h" |
| 29 #endif | 29 #endif |
| 30 | 30 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 NativeMenuDOMUI* found = submenu_->FindMenuAt(point); | 393 NativeMenuDOMUI* found = submenu_->FindMenuAt(point); |
| 394 if (found) | 394 if (found) |
| 395 return found; | 395 return found; |
| 396 } | 396 } |
| 397 gfx::Rect bounds; | 397 gfx::Rect bounds; |
| 398 menu_widget_->GetBounds(&bounds, false); | 398 menu_widget_->GetBounds(&bounds, false); |
| 399 return bounds.Contains(point) ? this : NULL; | 399 return bounds.Contains(point) ? this : NULL; |
| 400 } | 400 } |
| 401 | 401 |
| 402 } // namespace chromeos | 402 } // namespace chromeos |
| OLD | NEW |