| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 #include "web/ContextMenuAllowedScope.h" | 79 #include "web/ContextMenuAllowedScope.h" |
| 80 #include "web/WebDataSourceImpl.h" | 80 #include "web/WebDataSourceImpl.h" |
| 81 #include "web/WebLocalFrameImpl.h" | 81 #include "web/WebLocalFrameImpl.h" |
| 82 #include "web/WebPluginContainerImpl.h" | 82 #include "web/WebPluginContainerImpl.h" |
| 83 #include "web/WebViewImpl.h" | 83 #include "web/WebViewImpl.h" |
| 84 #include "wtf/text/WTFString.h" | 84 #include "wtf/text/WTFString.h" |
| 85 | 85 |
| 86 namespace blink { | 86 namespace blink { |
| 87 | 87 |
| 88 // Figure out the URL of a page or subframe. Returns |page_type| as the type, | 88 // Figure out the URL of a page or subframe. Returns |page_type| as the type, |
| 89 // which indicates page or subframe, or ContextNodeType::NONE if the URL could n
ot | 89 // which indicates page or subframe, or ContextNodeType::kNone if the URL could
not |
| 90 // be determined for some reason. | 90 // be determined for some reason. |
| 91 static WebURL urlFromFrame(LocalFrame* frame) | 91 static WebURL urlFromFrame(LocalFrame* frame) |
| 92 { | 92 { |
| 93 if (frame) { | 93 if (frame) { |
| 94 DocumentLoader* dl = frame->loader().documentLoader(); | 94 DocumentLoader* dl = frame->loader().documentLoader(); |
| 95 if (dl) { | 95 if (dl) { |
| 96 WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); | 96 WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); |
| 97 if (ds) | 97 if (ds) |
| 98 return ds->hasUnreachableURL() ? ds->unreachableURL() : ds->requ
est().url(); | 98 return ds->hasUnreachableURL() ? ds->unreachableURL() : ds->requ
est().url(); |
| 99 } | 99 } |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 outputItems[i] = subItems[i]; | 421 outputItems[i] = subItems[i]; |
| 422 subMenuItems.swap(outputItems); | 422 subMenuItems.swap(outputItems); |
| 423 } | 423 } |
| 424 | 424 |
| 425 void ContextMenuClientImpl::populateCustomMenuItems(const ContextMenu* defaultMe
nu, WebContextMenuData* data) | 425 void ContextMenuClientImpl::populateCustomMenuItems(const ContextMenu* defaultMe
nu, WebContextMenuData* data) |
| 426 { | 426 { |
| 427 populateSubMenuItems(defaultMenu->items(), data->customItems); | 427 populateSubMenuItems(defaultMenu->items(), data->customItems); |
| 428 } | 428 } |
| 429 | 429 |
| 430 } // namespace blink | 430 } // namespace blink |
| OLD | NEW |