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

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

Issue 819193002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « extensions/common/user_script.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "extensions/renderer/app_window_custom_bindings.h" 5 #include "extensions/renderer/app_window_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "content/public/renderer/render_thread.h" 10 #include "content/public/renderer/render_thread.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 v8::Local<v8::Value> window = frame->mainWorldScriptContext()->Global(); 106 v8::Local<v8::Value> window = frame->mainWorldScriptContext()->Global();
107 args.GetReturnValue().Set(window); 107 args.GetReturnValue().Set(window);
108 } 108 }
109 109
110 void AppWindowCustomBindings::GetWindowControlsHtmlTemplate( 110 void AppWindowCustomBindings::GetWindowControlsHtmlTemplate(
111 const v8::FunctionCallbackInfo<v8::Value>& args) { 111 const v8::FunctionCallbackInfo<v8::Value>& args) {
112 CHECK_EQ(args.Length(), 0); 112 CHECK_EQ(args.Length(), 0);
113 113
114 v8::Handle<v8::Value> result = v8::String::Empty(args.GetIsolate()); 114 v8::Handle<v8::Value> result = v8::String::Empty(args.GetIsolate());
115 if (CommandLine::ForCurrentProcess()->HasSwitch( 115 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
116 switches::kEnableAppWindowControls)) { 116 switches::kEnableAppWindowControls)) {
117 base::StringValue value( 117 base::StringValue value(
118 ResourceBundle::GetSharedInstance() 118 ResourceBundle::GetSharedInstance()
119 .GetRawDataResource(IDR_WINDOW_CONTROLS_TEMPLATE_HTML) 119 .GetRawDataResource(IDR_WINDOW_CONTROLS_TEMPLATE_HTML)
120 .as_string()); 120 .as_string());
121 scoped_ptr<content::V8ValueConverter> converter( 121 scoped_ptr<content::V8ValueConverter> converter(
122 content::V8ValueConverter::create()); 122 content::V8ValueConverter::create());
123 result = converter->ToV8Value(&value, context()->v8_context()); 123 result = converter->ToV8Value(&value, context()->v8_context());
124 } 124 }
125 args.GetReturnValue().Set(result); 125 args.GetReturnValue().Set(result);
126 } 126 }
127 127
128 } // namespace extensions 128 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/user_script.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698