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

Side by Side Diff: chrome/renderer/loadtimes_extension_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/loadtimes_extension_bindings.h" 5 #include "chrome/renderer/loadtimes_extension_bindings.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/public/renderer/document_state.h" 10 #include "content/public/renderer/document_state.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 "chrome.loadTimes = function() {" 45 "chrome.loadTimes = function() {"
46 " native function GetLoadTimes();" 46 " native function GetLoadTimes();"
47 " return GetLoadTimes();" 47 " return GetLoadTimes();"
48 "};" 48 "};"
49 "chrome.csi = function() {" 49 "chrome.csi = function() {"
50 " native function GetCSI();" 50 " native function GetCSI();"
51 " return GetCSI();" 51 " return GetCSI();"
52 "}") {} 52 "}") {}
53 53
54 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( 54 virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
55 v8::Handle<v8::String> name) { 55 v8::Handle<v8::String> name) OVERRIDE {
56 if (name->Equals(v8::String::New("GetLoadTimes"))) { 56 if (name->Equals(v8::String::New("GetLoadTimes"))) {
57 return v8::FunctionTemplate::New(GetLoadTimes); 57 return v8::FunctionTemplate::New(GetLoadTimes);
58 } else if (name->Equals(v8::String::New("GetCSI"))) { 58 } else if (name->Equals(v8::String::New("GetCSI"))) {
59 return v8::FunctionTemplate::New(GetCSI); 59 return v8::FunctionTemplate::New(GetCSI);
60 } 60 }
61 return v8::Handle<v8::FunctionTemplate>(); 61 return v8::Handle<v8::FunctionTemplate>();
62 } 62 }
63 63
64 static const char* GetNavigationType(WebNavigationType nav_type) { 64 static const char* GetNavigationType(WebNavigationType nav_type) {
65 switch (nav_type) { 65 switch (nav_type) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 return v8::Null(); 182 return v8::Null();
183 } 183 }
184 }; 184 };
185 185
186 v8::Extension* LoadTimesExtension::Get() { 186 v8::Extension* LoadTimesExtension::Get() {
187 return new LoadTimesExtensionWrapper(); 187 return new LoadTimesExtensionWrapper();
188 } 188 }
189 189
190 } // namespace extensions_v8 190 } // namespace extensions_v8
OLDNEW
« no previous file with comments | « chrome/renderer/external_extension.cc ('k') | chrome/renderer/page_click_tracker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698