Chromium Code Reviews| 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 #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 "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 #if defined(OS_ANDROID) | 25 #if defined(OS_ANDROID) |
| 26 #include "ui/gfx/geometry/point.h" | 26 #include "ui/gfx/geometry/point.h" |
| 27 #include "ui/gfx/geometry/rect.h" | |
| 27 #endif | 28 #endif |
| 28 | 29 |
| 29 namespace content { | 30 namespace content { |
| 30 | 31 |
| 31 struct CONTENT_EXPORT CustomContextMenuContext { | 32 struct CONTENT_EXPORT CustomContextMenuContext { |
| 32 static const int32_t kCurrentRenderWidget; | 33 static const int32_t kCurrentRenderWidget; |
| 33 | 34 |
| 34 CustomContextMenuContext(); | 35 CustomContextMenuContext(); |
| 35 | 36 |
| 36 bool is_pepper_menu; | 37 bool is_pepper_menu; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 std::vector<MenuItem> custom_items; | 153 std::vector<MenuItem> custom_items; |
| 153 | 154 |
| 154 ui::MenuSourceType source_type; | 155 ui::MenuSourceType source_type; |
| 155 | 156 |
| 156 // Extra properties for the context menu. | 157 // Extra properties for the context menu. |
| 157 std::map<std::string, std::string> properties; | 158 std::map<std::string, std::string> properties; |
| 158 | 159 |
| 159 #if defined(OS_ANDROID) | 160 #if defined(OS_ANDROID) |
| 160 // Points representing the coordinates in the document space of the start and | 161 // Points representing the coordinates in the document space of the start and |
| 161 // end of the selection, if there is one. | 162 // end of the selection, if there is one. |
| 162 gfx::Point selection_start; | 163 gfx::Point selection_start; |
|
aelias_OOO_until_Jul13
2017/04/21 21:42:19
What about this? Looks redundant with selection_r
| |
| 163 gfx::Point selection_end; | 164 gfx::Point selection_end; |
| 164 #endif | 165 #endif |
| 165 | 166 |
| 166 // If this node is an input field, the type of that field. | 167 // If this node is an input field, the type of that field. |
| 167 blink::WebContextMenuData::InputFieldType input_field_type; | 168 blink::WebContextMenuData::InputFieldType input_field_type; |
| 169 | |
| 170 gfx::Rect selection_rect; | |
|
boliu
2017/04/21 21:20:19
comment explaining this, what coordinate space is
| |
| 171 | |
| 172 bool from_touch; | |
|
boliu
2017/04/21 21:20:19
how is from_touch different from the two source ty
| |
| 168 }; | 173 }; |
| 169 | 174 |
| 170 } // namespace content | 175 } // namespace content |
| 171 | 176 |
| 172 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ | 177 #endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_PARAMS_H_ |
| OLD | NEW |