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

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

Issue 12226045: Linux/ChromeOS Chromium style checker cleanup, chrome/ edition part 1. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 v8::Handle<v8::Function> cb) 67 v8::Handle<v8::Function> cb)
68 : content::RenderViewObserver(view), 68 : content::RenderViewObserver(view),
69 isolate_(isolate), 69 isolate_(isolate),
70 callback_(v8::Persistent<v8::Function>::New(isolate, cb)) { 70 callback_(v8::Persistent<v8::Function>::New(isolate, cb)) {
71 } 71 }
72 72
73 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) OVERRIDE { 73 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) OVERRIDE {
74 CallbackAndDie(frame, true); 74 CallbackAndDie(frame, true);
75 } 75 }
76 76
77 virtual void DidFailProvisionalLoad(WebKit::WebFrame* frame, 77 virtual void DidFailProvisionalLoad(
78 const WebKit::WebURLError& error) { 78 WebKit::WebFrame* frame,
79 const WebKit::WebURLError& error) OVERRIDE {
79 CallbackAndDie(frame, false); 80 CallbackAndDie(frame, false);
80 } 81 }
81 82
82 virtual ~LoadWatcher() { 83 virtual ~LoadWatcher() {
83 callback_.Dispose(isolate_); 84 callback_.Dispose(isolate_);
84 } 85 }
85 86
86 private: 87 private:
87 v8::Isolate* isolate_; 88 v8::Isolate* isolate_;
88 v8::Persistent<v8::Function> callback_; 89 v8::Persistent<v8::Function> callback_;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 WebKit::WebFrame* frame = view->GetWebView()->mainFrame(); 165 WebKit::WebFrame* frame = view->GetWebView()->mainFrame();
165 frame->setOpener(opener); 166 frame->setOpener(opener);
166 content::RenderThread::Get()->Send( 167 content::RenderThread::Get()->Send(
167 new ExtensionHostMsg_ResumeRequests(view->GetRoutingID())); 168 new ExtensionHostMsg_ResumeRequests(view->GetRoutingID()));
168 169
169 v8::Local<v8::Value> window = frame->mainWorldScriptContext()->Global(); 170 v8::Local<v8::Value> window = frame->mainWorldScriptContext()->Global();
170 return window; 171 return window;
171 } 172 }
172 173
173 } // namespace extensions 174 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.cc ('k') | chrome/renderer/extensions/content_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698