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

Side by Side Diff: content/renderer/external_popup_menu.h

Issue 1992393002: Enable external popup menu in Blimp, part 1/2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
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 #ifndef CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_ 5 #ifndef CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
6 #define CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_ 6 #define CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 19 matching lines...) Expand all
30 30
31 void SetOriginScaleAndOffsetForEmulation( 31 void SetOriginScaleAndOffsetForEmulation(
32 float scale, const gfx::PointF& offset); 32 float scale, const gfx::PointF& offset);
33 33
34 #if defined(OS_MACOSX) 34 #if defined(OS_MACOSX)
35 // Called when the user has selected an item. |selected_item| is -1 if the 35 // Called when the user has selected an item. |selected_item| is -1 if the
36 // user canceled the popup. 36 // user canceled the popup.
37 void DidSelectItem(int selected_index); 37 void DidSelectItem(int selected_index);
38 #endif 38 #endif
39 39
40 #if defined(OS_ANDROID) 40 #if defined(USE_EXTERNAL_POPUP_MENU) && !defined(OS_MACOSX)
41 // Called when the user has selected items or canceled the popup. 41 // Called when the user has selected items or canceled the popup.
42 void DidSelectItems(bool canceled, const std::vector<int>& selected_indices); 42 void DidSelectItems(bool canceled, const std::vector<int>& selected_indices);
43 #endif 43 #endif
44 44
45 // blink::WebExternalPopupMenu implementation: 45 // blink::WebExternalPopupMenu implementation:
46 void show(const blink::WebRect& bounds) override; 46 void show(const blink::WebRect& bounds) override;
47 void close() override; 47 void close() override;
48 48
49 private: 49 private:
50 RenderFrameImpl* render_frame_; 50 RenderFrameImpl* render_frame_;
51 blink::WebPopupMenuInfo popup_menu_info_; 51 blink::WebPopupMenuInfo popup_menu_info_;
52 blink::WebExternalPopupMenuClient* popup_menu_client_; 52 blink::WebExternalPopupMenuClient* popup_menu_client_;
53 53
54 // Popups may be displaced when screen metrics emulation is enabled. 54 // Popups may be displaced when screen metrics emulation is enabled.
55 // These scale and offset are used to properly adjust popup position. 55 // These scale and offset are used to properly adjust popup position.
56 float origin_scale_for_emulation_; 56 float origin_scale_for_emulation_;
57 gfx::PointF origin_offset_for_emulation_; 57 gfx::PointF origin_offset_for_emulation_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu); 59 DISALLOW_COPY_AND_ASSIGN(ExternalPopupMenu);
60 }; 60 };
61 61
62 } // namespace content 62 } // namespace content
63 63
64 #endif // CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_ 64 #endif // CONTENT_RENDERER_EXTERNAL_POPUP_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698