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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::kNone if the URL could | 89 // which indicates page or subframe, or ContextNodeType::kNone if the URL could |
90 // not be determined for some reason. | 90 // not be determined for some reason. |
91 static WebURL urlFromFrame(LocalFrame* frame) { | 91 static WebURL urlFromFrame(LocalFrame* frame) { |
92 if (frame) { | 92 if (frame) { |
93 DocumentLoader* dl = frame->loader().documentLoader(); | 93 DocumentLoader* dl = frame->loader().documentLoader(); |
94 if (dl) { | 94 if (dl) { |
95 WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); | 95 WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); |
96 if (ds) | 96 if (ds) { |
97 return ds->hasUnreachableURL() ? ds->unreachableURL() | 97 return ds->hasUnreachableURL() ? ds->unreachableURL() |
98 : ds->request().url(); | 98 : ds->getRequest().url(); |
| 99 } |
99 } | 100 } |
100 } | 101 } |
101 return WebURL(); | 102 return WebURL(); |
102 } | 103 } |
103 | 104 |
104 static bool IsWhiteSpaceOrPunctuation(UChar c) { | 105 static bool IsWhiteSpaceOrPunctuation(UChar c) { |
105 return isSpaceOrNewline(c) || WTF::Unicode::isPunct(c); | 106 return isSpaceOrNewline(c) || WTF::Unicode::isPunct(c); |
106 } | 107 } |
107 | 108 |
108 static String selectMisspellingAsync(LocalFrame* selectedFrame, | 109 static String selectMisspellingAsync(LocalFrame* selectedFrame, |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 subMenuItems.swap(outputItems); | 451 subMenuItems.swap(outputItems); |
451 } | 452 } |
452 | 453 |
453 void ContextMenuClientImpl::populateCustomMenuItems( | 454 void ContextMenuClientImpl::populateCustomMenuItems( |
454 const ContextMenu* defaultMenu, | 455 const ContextMenu* defaultMenu, |
455 WebContextMenuData* data) { | 456 WebContextMenuData* data) { |
456 populateSubMenuItems(defaultMenu->items(), data->customItems); | 457 populateSubMenuItems(defaultMenu->items(), data->customItems); |
457 } | 458 } |
458 | 459 |
459 } // namespace blink | 460 } // namespace blink |
OLD | NEW |