| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2009 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 return; | 152 return; |
| 153 document = V8HTMLDocument::toImpl(documentWrapper); | 153 document = V8HTMLDocument::toImpl(documentWrapper); |
| 154 } else { | 154 } else { |
| 155 v8::Isolate* isolate = info.GetIsolate(); | 155 v8::Isolate* isolate = info.GetIsolate(); |
| 156 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype
Chain(isolate->GetEnteredContext()->Global(), isolate); | 156 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype
Chain(isolate->GetEnteredContext()->Global(), isolate); |
| 157 if (windowWrapper.IsEmpty()) | 157 if (windowWrapper.IsEmpty()) |
| 158 return; | 158 return; |
| 159 DOMWindow* window = V8Window::toImpl(windowWrapper); | 159 DOMWindow* window = V8Window::toImpl(windowWrapper); |
| 160 document = window ? toLocalDOMWindow(window)->document() : nullptr; | 160 document = window ? toLocalDOMWindow(window)->document() : nullptr; |
| 161 } | 161 } |
| 162 if (!document || !document->page()) | 162 if (!document || !document->frame()) |
| 163 return; | 163 return; |
| 164 | 164 |
| 165 DevToolsHost* devtoolsHost = V8DevToolsHost::toImpl(info.Holder()); | 165 DevToolsHost* devtoolsHost = V8DevToolsHost::toImpl(info.Holder()); |
| 166 Vector<ContextMenuItem> items = menu.items(); | 166 Vector<ContextMenuItem> items = menu.items(); |
| 167 devtoolsHost->showContextMenu(document->page(), static_cast<float>(x->Number
Value()), static_cast<float>(y->NumberValue()), items); | 167 devtoolsHost->showContextMenu(document->frame(), static_cast<float>(x->Numbe
rValue()), static_cast<float>(y->NumberValue()), items); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace blink | 170 } // namespace blink |
| 171 | 171 |
| OLD | NEW |