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

Side by Side Diff: chrome/renderer/searchbox/searchbox_extension.cc

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another rebase Created 7 years, 9 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
« no previous file with comments | « chrome/renderer/searchbox/searchbox.cc ('k') | chrome/test/base/testing_profile.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/searchbox/searchbox_extension.h" 5 #include "chrome/renderer/searchbox/searchbox_extension.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/common/extensions/extension.h" 11 #include "chrome/common/extensions/extension.h"
12 #include "chrome/renderer/searchbox/searchbox.h" 12 #include "chrome/renderer/searchbox/searchbox.h"
13 #include "content/public/renderer/render_view.h" 13 #include "content/public/renderer/render_view.h"
14 #include "grit/renderer_resources.h" 14 #include "grit/renderer_resources.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
19 #include "ui/base/keycodes/keyboard_codes.h" 19 #include "ui/base/keycodes/keyboard_codes.h"
20 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
21 #include "ui/base/window_open_disposition.h" 21 #include "ui/base/window_open_disposition.h"
22 #include "v8/include/v8.h" 22 #include "v8/include/v8.h"
23 23
24 namespace { 24 namespace {
25 25
26 const char kCSSBackgroundImageFormat[] = 26 const char kCSSBackgroundImageFormat[] = "-webkit-image-set("
27 "-webkit-image-set(url(chrome://theme/IDR_THEME_BACKGROUND?%s) 1x)"; 27 "url(chrome-search://theme/IDR_THEME_NTP_BACKGROUND?%s) 1x)";
28 28
29 const char kCSSBackgroundColorFormat[] = "rgba(%d,%d,%d,%s)"; 29 const char kCSSBackgroundColorFormat[] = "rgba(%d,%d,%d,%s)";
30 30
31 const char kCSSBackgroundPositionCenter[] = "center"; 31 const char kCSSBackgroundPositionCenter[] = "center";
32 const char kCSSBackgroundPositionLeft[] = "left"; 32 const char kCSSBackgroundPositionLeft[] = "left";
33 const char kCSSBackgroundPositionTop[] = "top"; 33 const char kCSSBackgroundPositionTop[] = "top";
34 const char kCSSBackgroundPositionRight[] = "right"; 34 const char kCSSBackgroundPositionRight[] = "right";
35 const char kCSSBackgroundPositionBottom[] = "bottom"; 35 const char kCSSBackgroundPositionBottom[] = "bottom";
36 36
37 const char kCSSBackgroundRepeatNo[] = "no-repeat"; 37 const char kCSSBackgroundRepeatNo[] = "no-repeat";
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 void SearchBoxExtension::DispatchThemeChange(WebKit::WebFrame* frame) { 1067 void SearchBoxExtension::DispatchThemeChange(WebKit::WebFrame* frame) {
1068 Dispatch(frame, kDispatchThemeChangeEventScript); 1068 Dispatch(frame, kDispatchThemeChangeEventScript);
1069 } 1069 }
1070 1070
1071 // static 1071 // static
1072 void SearchBoxExtension::DispatchMostVisitedChanged( 1072 void SearchBoxExtension::DispatchMostVisitedChanged(
1073 WebKit::WebFrame* frame) { 1073 WebKit::WebFrame* frame) {
1074 Dispatch(frame, kDispatchMostVisitedChangedScript); 1074 Dispatch(frame, kDispatchMostVisitedChangedScript);
1075 } 1075 }
1076 } // namespace extensions_v8 1076 } // namespace extensions_v8
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox.cc ('k') | chrome/test/base/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698