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

Side by Side Diff: webkit/tools/test_shell/test_shell_webkit_init.h

Issue 149760: Introduce WebLocalizedString and queryLocalizedString methods... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « webkit/glue/webkitclient_impl.cc ('k') | webkit/webkit.gyp » ('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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
7 7
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stats_counters.h" 10 #include "base/stats_counters.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 clipboard_.reset(new webkit_glue::WebClipboardImpl()); 64 clipboard_.reset(new webkit_glue::WebClipboardImpl());
65 } 65 }
66 } 66 }
67 return clipboard_.get(); 67 return clipboard_.get();
68 } 68 }
69 69
70 virtual WebKit::WebSandboxSupport* sandboxSupport() { 70 virtual WebKit::WebSandboxSupport* sandboxSupport() {
71 return NULL; 71 return NULL;
72 } 72 }
73 73
74 virtual bool getFileSize(const WebKit::WebString& path, long long& result) {
75 return file_util::GetFileSize(
76 FilePath(webkit_glue::WebStringToFilePathString(path)), &result);
77 }
78
74 virtual unsigned long long visitedLinkHash(const char* canonicalURL, 79 virtual unsigned long long visitedLinkHash(const char* canonicalURL,
75 size_t length) { 80 size_t length) {
76 return 0; 81 return 0;
77 } 82 }
78 83
79 virtual bool isLinkVisited(unsigned long long linkHash) { 84 virtual bool isLinkVisited(unsigned long long linkHash) {
80 return false; 85 return false;
81 } 86 }
82 87
83 virtual void setCookies(const WebKit::WebURL& url, 88 virtual void setCookies(const WebKit::WebURL& url,
84 const WebKit::WebURL& first_party_for_cookies, 89 const WebKit::WebURL& first_party_for_cookies,
85 const WebKit::WebString& value) { 90 const WebKit::WebString& value) {
86 SimpleResourceLoaderBridge::SetCookie( 91 SimpleResourceLoaderBridge::SetCookie(
87 url, first_party_for_cookies, UTF16ToUTF8(value)); 92 url, first_party_for_cookies, UTF16ToUTF8(value));
88 } 93 }
89 94
90 virtual WebKit::WebString cookies( 95 virtual WebKit::WebString cookies(
91 const WebKit::WebURL& url, 96 const WebKit::WebURL& url,
92 const WebKit::WebURL& first_party_for_cookies) { 97 const WebKit::WebURL& first_party_for_cookies) {
93 return UTF8ToUTF16(SimpleResourceLoaderBridge::GetCookies( 98 return UTF8ToUTF16(SimpleResourceLoaderBridge::GetCookies(
94 url, first_party_for_cookies)); 99 url, first_party_for_cookies));
95 } 100 }
96 101
97 virtual void prefetchHostName(const WebKit::WebString&) { 102 virtual void prefetchHostName(const WebKit::WebString&) {
98 } 103 }
99 104
100 virtual bool getFileSize(const WebKit::WebString& path, long long& result) {
101 return file_util::GetFileSize(
102 FilePath(webkit_glue::WebStringToFilePathString(path)), &result);
103 }
104
105 virtual WebKit::WebData loadResource(const char* name) { 105 virtual WebKit::WebData loadResource(const char* name) {
106 if (!strcmp(name, "deleteButton")) { 106 if (!strcmp(name, "deleteButton")) {
107 // Create a red 30x30 square. 107 // Create a red 30x30 square.
108 const char red_square[] = 108 const char red_square[] =
109 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52" 109 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52"
110 "\x00\x00\x00\x1e\x00\x00\x00\x1e\x04\x03\x00\x00\x00\xc9\x1e\xb3" 110 "\x00\x00\x00\x1e\x00\x00\x00\x1e\x04\x03\x00\x00\x00\xc9\x1e\xb3"
111 "\x91\x00\x00\x00\x30\x50\x4c\x54\x45\x00\x00\x00\x80\x00\x00\x00" 111 "\x91\x00\x00\x00\x30\x50\x4c\x54\x45\x00\x00\x00\x80\x00\x00\x00"
112 "\x80\x00\x80\x80\x00\x00\x00\x80\x80\x00\x80\x00\x80\x80\x80\x80" 112 "\x80\x00\x80\x80\x00\x00\x00\x80\x80\x00\x80\x00\x80\x80\x80\x80"
113 "\x80\xc0\xc0\xc0\xff\x00\x00\x00\xff\x00\xff\xff\x00\x00\x00\xff" 113 "\x80\xc0\xc0\xc0\xff\x00\x00\x00\xff\x00\xff\xff\x00\x00\x00\xff"
114 "\xff\x00\xff\x00\xff\xff\xff\xff\xff\x7b\x1f\xb1\xc4\x00\x00\x00" 114 "\xff\x00\xff\x00\xff\xff\xff\xff\xff\x7b\x1f\xb1\xc4\x00\x00\x00"
(...skipping 10 matching lines...) Expand all
125 virtual WebKit::WebString defaultLocale() { 125 virtual WebKit::WebString defaultLocale() {
126 return ASCIIToUTF16("en-US"); 126 return ASCIIToUTF16("en-US");
127 } 127 }
128 128
129 private: 129 private:
130 webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; 130 webkit_glue::SimpleWebMimeRegistryImpl mime_registry_;
131 scoped_ptr<WebKit::WebClipboard> clipboard_; 131 scoped_ptr<WebKit::WebClipboard> clipboard_;
132 }; 132 };
133 133
134 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_ 134 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
OLDNEW
« no previous file with comments | « webkit/glue/webkitclient_impl.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698