OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" |
8 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
9 #include "base/compiler_specific.h" | |
10 #include "chrome/browser/automation/automation_browser_tracker.h" | 10 #include "chrome/browser/automation/automation_browser_tracker.h" |
11 #include "chrome/browser/automation/automation_window_tracker.h" | 11 #include "chrome/browser/automation/automation_window_tracker.h" |
12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
13 #include "chrome/browser/ui/views/frame/browser_view.h" | 13 #include "chrome/browser/ui/views/frame/browser_view.h" |
14 #include "chrome/browser/ui/views/toolbar_view.h" | 14 #include "chrome/browser/ui/views/toolbar_view.h" |
15 #include "chrome/common/automation_messages.h" | 15 #include "chrome/common/automation_messages.h" |
16 #include "ui/gfx/point.h" | 16 #include "ui/gfx/point.h" |
| 17 #include "ui/views/widget/widget.h" |
17 #include "views/controls/menu/menu_listener.h" | 18 #include "views/controls/menu/menu_listener.h" |
18 #include "views/view.h" | 19 #include "views/view.h" |
19 #include "views/widget/widget.h" | |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Helper class that waits until the focus has changed to a view other | 23 // Helper class that waits until the focus has changed to a view other |
24 // than the one with the provided view id. | 24 // than the one with the provided view id. |
25 class ViewFocusChangeWaiter : public views::FocusChangeListener { | 25 class ViewFocusChangeWaiter : public views::FocusChangeListener { |
26 public: | 26 public: |
27 ViewFocusChangeWaiter(views::FocusManager* focus_manager, | 27 ViewFocusChangeWaiter(views::FocusManager* focus_manager, |
28 int previous_view_id, | 28 int previous_view_id, |
29 AutomationProvider* automation, | 29 AutomationProvider* automation, |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 reply_message, true); | 187 reply_message, true); |
188 Send(reply_message); | 188 Send(reply_message); |
189 return; | 189 return; |
190 } | 190 } |
191 | 191 |
192 // Otherwise, register this reply message with the waiter, | 192 // Otherwise, register this reply message with the waiter, |
193 // which will handle responding to this IPC when the popup | 193 // which will handle responding to this IPC when the popup |
194 // menu opens. | 194 // menu opens. |
195 popup_menu_waiter_->set_reply_message(reply_message); | 195 popup_menu_waiter_->set_reply_message(reply_message); |
196 } | 196 } |
OLD | NEW |