| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "core/frame/Settings.h" | 47 #include "core/frame/Settings.h" |
| 48 #include "core/frame/VisualViewport.h" | 48 #include "core/frame/VisualViewport.h" |
| 49 #include "core/frame/WebLocalFrameBase.h" | 49 #include "core/frame/WebLocalFrameBase.h" |
| 50 #include "core/html/HTMLAnchorElement.h" | 50 #include "core/html/HTMLAnchorElement.h" |
| 51 #include "core/html/HTMLFormElement.h" | 51 #include "core/html/HTMLFormElement.h" |
| 52 #include "core/html/HTMLFrameElementBase.h" | 52 #include "core/html/HTMLFrameElementBase.h" |
| 53 #include "core/html/HTMLImageElement.h" | 53 #include "core/html/HTMLImageElement.h" |
| 54 #include "core/html/HTMLInputElement.h" | 54 #include "core/html/HTMLInputElement.h" |
| 55 #include "core/html/HTMLMediaElement.h" | 55 #include "core/html/HTMLMediaElement.h" |
| 56 #include "core/html/HTMLPlugInElement.h" | 56 #include "core/html/HTMLPlugInElement.h" |
| 57 #include "core/input/ContextMenuAllowedScope.h" |
| 57 #include "core/input/EventHandler.h" | 58 #include "core/input/EventHandler.h" |
| 58 #include "core/layout/HitTestResult.h" | 59 #include "core/layout/HitTestResult.h" |
| 59 #include "core/layout/LayoutPart.h" | 60 #include "core/layout/LayoutPart.h" |
| 60 #include "core/loader/DocumentLoader.h" | 61 #include "core/loader/DocumentLoader.h" |
| 61 #include "core/loader/FrameLoader.h" | 62 #include "core/loader/FrameLoader.h" |
| 62 #include "core/loader/HistoryItem.h" | 63 #include "core/loader/HistoryItem.h" |
| 63 #include "core/page/ContextMenuController.h" | 64 #include "core/page/ContextMenuController.h" |
| 64 #include "core/page/Page.h" | 65 #include "core/page/Page.h" |
| 65 #include "platform/ContextMenu.h" | 66 #include "platform/ContextMenu.h" |
| 66 #include "platform/exported/WrappedResourceResponse.h" | 67 #include "platform/exported/WrappedResourceResponse.h" |
| 67 #include "platform/text/TextBreakIterator.h" | 68 #include "platform/text/TextBreakIterator.h" |
| 68 #include "platform/weborigin/KURL.h" | 69 #include "platform/weborigin/KURL.h" |
| 69 #include "platform/wtf/text/WTFString.h" | 70 #include "platform/wtf/text/WTFString.h" |
| 70 #include "public/platform/WebPoint.h" | 71 #include "public/platform/WebPoint.h" |
| 71 #include "public/platform/WebString.h" | 72 #include "public/platform/WebString.h" |
| 72 #include "public/platform/WebURL.h" | 73 #include "public/platform/WebURL.h" |
| 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 |