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

Side by Side Diff: content/public/common/context_menu_params.h

Issue 2855353002: Make Paste Popup use selection rect for positioning (Closed)
Patch Set: fix typo Created 3 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_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_
6 #define CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ 6 #define CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/public/common/menu_item.h" 17 #include "content/public/common/menu_item.h"
18 #include "content/public/common/page_state.h" 18 #include "content/public/common/page_state.h"
19 #include "third_party/WebKit/public/platform/WebCString.h" 19 #include "third_party/WebKit/public/platform/WebCString.h"
20 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" 20 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
21 #include "third_party/WebKit/public/web/WebContextMenuData.h" 21 #include "third_party/WebKit/public/web/WebContextMenuData.h"
22 #include "ui/base/ui_base_types.h" 22 #include "ui/base/ui_base_types.h"
23 #include "ui/gfx/geometry/rect.h"
23 #include "url/gurl.h" 24 #include "url/gurl.h"
24 25
25 #if defined(OS_ANDROID)
26 #include "ui/gfx/geometry/point.h"
27 #endif
28
29 namespace content { 26 namespace content {
30 27
31 struct CONTENT_EXPORT CustomContextMenuContext { 28 struct CONTENT_EXPORT CustomContextMenuContext {
32 static const int32_t kCurrentRenderWidget; 29 static const int32_t kCurrentRenderWidget;
33 30
34 CustomContextMenuContext(); 31 CustomContextMenuContext();
35 32
36 bool is_pepper_menu; 33 bool is_pepper_menu;
37 int request_id; 34 int request_id;
38 // The routing ID of the render widget on which the context menu is shown. 35 // The routing ID of the render widget on which the context menu is shown.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 blink::WebReferrerPolicy referrer_policy; 146 blink::WebReferrerPolicy referrer_policy;
150 147
151 CustomContextMenuContext custom_context; 148 CustomContextMenuContext custom_context;
152 std::vector<MenuItem> custom_items; 149 std::vector<MenuItem> custom_items;
153 150
154 ui::MenuSourceType source_type; 151 ui::MenuSourceType source_type;
155 152
156 // Extra properties for the context menu. 153 // Extra properties for the context menu.
157 std::map<std::string, std::string> properties; 154 std::map<std::string, std::string> properties;
158 155
159 #if defined(OS_ANDROID)
160 // Points representing the coordinates in the document space of the start and
161 // end of the selection, if there is one.
162 gfx::Point selection_start;
163 gfx::Point selection_end;
164 #endif
165
166 // If this node is an input field, the type of that field. 156 // If this node is an input field, the type of that field.
167 blink::WebContextMenuData::InputFieldType input_field_type; 157 blink::WebContextMenuData::InputFieldType input_field_type;
158
159 // Rect representing the coordinates in the document space of the selection.
160 gfx::Rect selection_rect;
168 }; 161 };
169 162
170 } // namespace content 163 } // namespace content
171 164
172 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ 165 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698