OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "core/InputTypeNames.h" | 36 #include "core/InputTypeNames.h" |
37 #include "core/css/CSSStyleDeclaration.h" | 37 #include "core/css/CSSStyleDeclaration.h" |
38 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
39 #include "core/dom/ElementTraversal.h" | 39 #include "core/dom/ElementTraversal.h" |
40 #include "core/editing/Editor.h" | 40 #include "core/editing/Editor.h" |
41 #include "core/editing/markers/DocumentMarkerController.h" | 41 #include "core/editing/markers/DocumentMarkerController.h" |
42 #include "core/editing/spellcheck/SpellChecker.h" | 42 #include "core/editing/spellcheck/SpellChecker.h" |
43 #include "core/exported/WebDataSourceImpl.h" | 43 #include "core/exported/WebDataSourceImpl.h" |
44 #include "core/exported/WebPluginContainerBase.h" | 44 #include "core/exported/WebPluginContainerBase.h" |
45 #include "core/exported/WebViewBase.h" | 45 #include "core/exported/WebViewBase.h" |
| 46 #include "core/frame/ContextMenuAllowedScope.h" |
46 #include "core/frame/FrameView.h" | 47 #include "core/frame/FrameView.h" |
47 #include "core/frame/Settings.h" | 48 #include "core/frame/Settings.h" |
48 #include "core/frame/VisualViewport.h" | 49 #include "core/frame/VisualViewport.h" |
49 #include "core/frame/WebLocalFrameBase.h" | 50 #include "core/frame/WebLocalFrameBase.h" |
50 #include "core/html/HTMLAnchorElement.h" | 51 #include "core/html/HTMLAnchorElement.h" |
51 #include "core/html/HTMLFormElement.h" | 52 #include "core/html/HTMLFormElement.h" |
52 #include "core/html/HTMLFrameElementBase.h" | 53 #include "core/html/HTMLFrameElementBase.h" |
53 #include "core/html/HTMLImageElement.h" | 54 #include "core/html/HTMLImageElement.h" |
54 #include "core/html/HTMLInputElement.h" | 55 #include "core/html/HTMLInputElement.h" |
55 #include "core/html/HTMLMediaElement.h" | 56 #include "core/html/HTMLMediaElement.h" |
(...skipping 17 matching lines...) Expand all Loading... |
73 #include "public/platform/WebURLResponse.h" | 74 #include "public/platform/WebURLResponse.h" |
74 #include "public/platform/WebVector.h" | 75 #include "public/platform/WebVector.h" |
75 #include "public/web/WebContextMenuData.h" | 76 #include "public/web/WebContextMenuData.h" |
76 #include "public/web/WebFormElement.h" | 77 #include "public/web/WebFormElement.h" |
77 #include "public/web/WebFrameClient.h" | 78 #include "public/web/WebFrameClient.h" |
78 #include "public/web/WebMenuItemInfo.h" | 79 #include "public/web/WebMenuItemInfo.h" |
79 #include "public/web/WebPlugin.h" | 80 #include "public/web/WebPlugin.h" |
80 #include "public/web/WebSearchableFormData.h" | 81 #include "public/web/WebSearchableFormData.h" |
81 #include "public/web/WebTextCheckClient.h" | 82 #include "public/web/WebTextCheckClient.h" |
82 #include "public/web/WebViewClient.h" | 83 #include "public/web/WebViewClient.h" |
83 #include "web/ContextMenuAllowedScope.h" | |
84 | 84 |
85 namespace blink { | 85 namespace blink { |
86 | 86 |
87 // Figure out the URL of a page or subframe. Returns |page_type| as the type, | 87 // Figure out the URL of a page or subframe. Returns |page_type| as the type, |
88 // which indicates page or subframe, or ContextNodeType::kNone if the URL could | 88 // which indicates page or subframe, or ContextNodeType::kNone if the URL could |
89 // not be determined for some reason. | 89 // not be determined for some reason. |
90 static WebURL UrlFromFrame(LocalFrame* frame) { | 90 static WebURL UrlFromFrame(LocalFrame* frame) { |
91 if (frame) { | 91 if (frame) { |
92 DocumentLoader* dl = frame->Loader().GetDocumentLoader(); | 92 DocumentLoader* dl = frame->Loader().GetDocumentLoader(); |
93 if (dl) { | 93 if (dl) { |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 sub_menu_items.Swap(output_items); | 559 sub_menu_items.Swap(output_items); |
560 } | 560 } |
561 | 561 |
562 void ContextMenuClientImpl::PopulateCustomMenuItems( | 562 void ContextMenuClientImpl::PopulateCustomMenuItems( |
563 const ContextMenu* default_menu, | 563 const ContextMenu* default_menu, |
564 WebContextMenuData* data) { | 564 WebContextMenuData* data) { |
565 PopulateSubMenuItems(default_menu->Items(), data->custom_items); | 565 PopulateSubMenuItems(default_menu->Items(), data->custom_items); |
566 } | 566 } |
567 | 567 |
568 } // namespace blink | 568 } // namespace blink |
OLD | NEW |