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

Side by Side Diff: chrome/renderer/extensions/app_window_custom_bindings.cc

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/extensions/app_window_custom_bindings.h" 5 #include "chrome/renderer/extensions/app_window_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/common/extensions/extension_messages.h" 9 #include "chrome/common/extensions/extension_messages.h"
10 #include "chrome/renderer/extensions/chrome_v8_context.h" 10 #include "chrome/renderer/extensions/chrome_v8_context.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 v8_context->module_system()->CallModuleMethod( 45 v8_context->module_system()->CallModuleMethod(
46 "injectAppTitlebar", "didCreateDocumentElement"); 46 "injectAppTitlebar", "didCreateDocumentElement");
47 } 47 }
48 48
49 private: 49 private:
50 Dispatcher* dispatcher_; 50 Dispatcher* dispatcher_;
51 }; 51 };
52 52
53 AppWindowCustomBindings::AppWindowCustomBindings( 53 AppWindowCustomBindings::AppWindowCustomBindings(
54 Dispatcher* dispatcher, 54 Dispatcher* dispatcher,
55 v8::Handle<v8::Context> context) : ChromeV8Extension(dispatcher, context) { 55 ChromeV8Context* context) : ChromeV8Extension(dispatcher, context) {
56 RouteFunction("GetView", 56 RouteFunction("GetView",
57 base::Bind(&AppWindowCustomBindings::GetView, 57 base::Bind(&AppWindowCustomBindings::GetView,
58 base::Unretained(this))); 58 base::Unretained(this)));
59 RouteFunction("OnContextReady", 59 RouteFunction("OnContextReady",
60 base::Bind(&AppWindowCustomBindings::OnContextReady, 60 base::Bind(&AppWindowCustomBindings::OnContextReady,
61 base::Unretained(this))); 61 base::Unretained(this)));
62 } 62 }
63 63
64 namespace { 64 namespace {
65 class LoadWatcher : public content::RenderViewObserver { 65 class LoadWatcher : public content::RenderViewObserver {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 WebKit::WebFrame* frame = view->GetWebView()->mainFrame(); 161 WebKit::WebFrame* frame = view->GetWebView()->mainFrame();
162 frame->setOpener(opener); 162 frame->setOpener(opener);
163 content::RenderThread::Get()->Send( 163 content::RenderThread::Get()->Send(
164 new ExtensionHostMsg_ResumeRequests(view->GetRoutingID())); 164 new ExtensionHostMsg_ResumeRequests(view->GetRoutingID()));
165 165
166 v8::Local<v8::Value> window = frame->mainWorldScriptContext()->Global(); 166 v8::Local<v8::Value> window = frame->mainWorldScriptContext()->Global();
167 return window; 167 return window;
168 } 168 }
169 169
170 } // namespace extensions 170 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698