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

Unified Diff: chrome/renderer/searchbox/searchbox_extension.cc

Issue 17699006: Pipe a bit down to the InstantExtended new tab page javascript API for whether or not the app launc… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kill some whitespace 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/searchbox/searchbox.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc
index 4b3043a185357058b25049ec770f7fffc355339d..5896f09c372b8052466bdc786eab6f3e7b2e6882 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -572,6 +572,10 @@ class SearchBoxExtensionWrapper : public v8::Extension {
// Gets the font size of the text in the omnibox.
static void GetFontSize(const v8::FunctionCallbackInfo<v8::Value>& args);
+ // Gets the font size of the text in the omnibox.
Jered 2013/06/25 20:34:35 Update comment.
David Black 2013/06/25 21:33:06 Done.
+ 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 @@ v8::Handle<v8::FunctionTemplate> SearchBoxExtensionWrapper::GetNativeFunction(
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 @@ void SearchBoxExtensionWrapper::GetFontSize(
}
// 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();
« no previous file with comments | « chrome/renderer/searchbox/searchbox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698