| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Igalia S.L | 3 * Copyright (C) 2010 Igalia S.L |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 DEFINE_TRACE(ContextMenuController) | 62 DEFINE_TRACE(ContextMenuController) |
| 63 { | 63 { |
| 64 visitor->trace(m_menuProvider); | 64 visitor->trace(m_menuProvider); |
| 65 visitor->trace(m_hitTestResult); | 65 visitor->trace(m_hitTestResult); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void ContextMenuController::clearContextMenu() | 68 void ContextMenuController::clearContextMenu() |
| 69 { | 69 { |
| 70 m_contextMenu.clear(); | 70 m_contextMenu.reset(); |
| 71 if (m_menuProvider) | 71 if (m_menuProvider) |
| 72 m_menuProvider->contextMenuCleared(); | 72 m_menuProvider->contextMenuCleared(); |
| 73 m_menuProvider = nullptr; | 73 m_menuProvider = nullptr; |
| 74 m_client->clearContextMenu(); | 74 m_client->clearContextMenu(); |
| 75 m_hitTestResult = HitTestResult(); | 75 m_hitTestResult = HitTestResult(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void ContextMenuController::documentDetached(Document* document) | 78 void ContextMenuController::documentDetached(Document* document) |
| 79 { | 79 { |
| 80 if (Node* innerNode = m_hitTestResult.innerNode()) { | 80 if (Node* innerNode = m_hitTestResult.innerNode()) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 ASSERT(item->type() == ActionType || item->type() == CheckableActionType); | 188 ASSERT(item->type() == ActionType || item->type() == CheckableActionType); |
| 189 | 189 |
| 190 if (item->action() < ContextMenuItemBaseCustomTag || item->action() > Contex
tMenuItemLastCustomTag) | 190 if (item->action() < ContextMenuItemBaseCustomTag || item->action() > Contex
tMenuItemLastCustomTag) |
| 191 return; | 191 return; |
| 192 | 192 |
| 193 ASSERT(m_menuProvider); | 193 ASSERT(m_menuProvider); |
| 194 m_menuProvider->contextMenuItemSelected(item); | 194 m_menuProvider->contextMenuItemSelected(item); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace blink | 197 } // namespace blink |
| OLD | NEW |