Index: chrome/renderer/searchbox/searchbox_extension.cc |
=================================================================== |
--- chrome/renderer/searchbox/searchbox_extension.cc (revision 208940) |
+++ chrome/renderer/searchbox/searchbox_extension.cc (working copy) |
@@ -572,6 +572,10 @@ |
// Gets the font size of the text in the omnibox. |
static void GetFontSize(const v8::FunctionCallbackInfo<v8::Value>& args); |
+ // Gets whether or not the app launcher is enabled. |
+ static void GetAppLauncherEnabled( |
+ const v8::FunctionCallbackInfo<v8::Value>& args); |
+ |
// Navigates the window to a URL represented by either a URL string or a |
// restricted ID. The two variants handle restricted IDs in their |
// respective namespaces. |
@@ -701,6 +705,8 @@ |
return v8::FunctionTemplate::New(GetFont); |
if (name->Equals(v8::String::New("GetFontSize"))) |
return v8::FunctionTemplate::New(GetFontSize); |
+ if (name->Equals(v8::String::New("GetAppLauncherEnabled"))) |
+ return v8::FunctionTemplate::New(GetAppLauncherEnabled); |
if (name->Equals(v8::String::New("NavigateSearchBox"))) |
return v8::FunctionTemplate::New(NavigateSearchBox); |
if (name->Equals(v8::String::New("NavigateNewTabPage"))) |
@@ -1031,6 +1037,16 @@ |
} |
// static |
+void SearchBoxExtensionWrapper::GetAppLauncherEnabled( |
+ const v8::FunctionCallbackInfo<v8::Value>& args) { |
+ content::RenderView* render_view = GetRenderView(); |
+ if (!render_view) return; |
+ |
+ args.GetReturnValue().Set( |
+ SearchBox::Get(render_view)->app_launcher_enabled()); |
+} |
+ |
+// static |
void SearchBoxExtensionWrapper::NavigateSearchBox( |
const v8::FunctionCallbackInfo<v8::Value>& args) { |
content::RenderView* render_view = GetRenderView(); |