| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 MouseEvent* mouse_event = static_cast<MouseEvent*>(event); | 167 MouseEvent* mouse_event = static_cast<MouseEvent*>(event); |
| 168 from_touch = mouse_event->FromTouch(); | 168 from_touch = mouse_event->FromTouch(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 if (client_->ShowContextMenu(context_menu_.get(), from_touch) && event) | 171 if (client_->ShowContextMenu(context_menu_.get(), from_touch) && event) |
| 172 event->SetDefaultHandled(); | 172 event->SetDefaultHandled(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void ContextMenuController::ContextMenuItemSelected( | 175 void ContextMenuController::ContextMenuItemSelected( |
| 176 const ContextMenuItem* item) { | 176 const ContextMenuItem* item) { |
| 177 ASSERT(item->GetType() == kActionType || | 177 DCHECK(item->GetType() == kActionType || |
| 178 item->GetType() == kCheckableActionType); | 178 item->GetType() == kCheckableActionType); |
| 179 | 179 |
| 180 if (item->Action() < kContextMenuItemBaseCustomTag || | 180 if (item->Action() < kContextMenuItemBaseCustomTag || |
| 181 item->Action() > kContextMenuItemLastCustomTag) | 181 item->Action() > kContextMenuItemLastCustomTag) |
| 182 return; | 182 return; |
| 183 | 183 |
| 184 DCHECK(menu_provider_); | 184 DCHECK(menu_provider_); |
| 185 menu_provider_->ContextMenuItemSelected(item); | 185 menu_provider_->ContextMenuItemSelected(item); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace blink | 188 } // namespace blink |
| OLD | NEW |