OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "content/renderer/external_popup_menu.h" | 5 #include "content/renderer/external_popup_menu.h" |
6 | 6 |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/renderer/render_view_impl.h" | 8 #include "content/renderer/render_view_impl.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenuC
lient.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebExternalPopupMenuC
lient.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
11 | 11 |
| 12 namespace content { |
| 13 |
12 ExternalPopupMenu::ExternalPopupMenu( | 14 ExternalPopupMenu::ExternalPopupMenu( |
13 RenderViewImpl* render_view, | 15 RenderViewImpl* render_view, |
14 const WebKit::WebPopupMenuInfo& popup_menu_info, | 16 const WebKit::WebPopupMenuInfo& popup_menu_info, |
15 WebKit::WebExternalPopupMenuClient* popup_menu_client) | 17 WebKit::WebExternalPopupMenuClient* popup_menu_client) |
16 : render_view_(render_view), | 18 : render_view_(render_view), |
17 popup_menu_info_(popup_menu_info), | 19 popup_menu_info_(popup_menu_info), |
18 popup_menu_client_(popup_menu_client) { | 20 popup_menu_client_(popup_menu_client) { |
19 } | 21 } |
20 | 22 |
21 void ExternalPopupMenu::show(const WebKit::WebRect& bounds) { | 23 void ExternalPopupMenu::show(const WebKit::WebRect& bounds) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const std::vector<int>& indices) { | 56 const std::vector<int>& indices) { |
55 if (!popup_menu_client_) | 57 if (!popup_menu_client_) |
56 return; | 58 return; |
57 if (canceled) | 59 if (canceled) |
58 popup_menu_client_->didCancel(); | 60 popup_menu_client_->didCancel(); |
59 else | 61 else |
60 popup_menu_client_->didAcceptIndices(indices); | 62 popup_menu_client_->didAcceptIndices(indices); |
61 } | 63 } |
62 #endif | 64 #endif |
63 | 65 |
| 66 } // namespace content |
OLD | NEW |