Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: Source/bindings/core/v8/custom/V8DevToolsHostCustom.cpp

Issue 900543003: DevTools: do not abuse inspector controller for the front-end side plumbing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed initializer. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/inspector/DevToolsHost.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/DevToolsHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698