summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-06-09 11:47:42 +0100
committerKristian Monsen <kristianm@google.com>2011-06-29 14:33:03 +0100
commitdc0f95d653279beabeb9817299e2902918ba123e (patch)
tree32eb121cd532053a5b9cb0c390331349af8d6baa /webkit
parentba160cd4054d13d0cb0b1b46e61c3bed67095811 (diff)
downloadexternal_chromium-dc0f95d653279beabeb9817299e2902918ba123e.zip
external_chromium-dc0f95d653279beabeb9817299e2902918ba123e.tar.gz
external_chromium-dc0f95d653279beabeb9817299e2902918ba123e.tar.bz2
Merge Chromium at r11.0.696.0: Initial merge by git
Change-Id: I273dde2843af0839dfc08b419bb443fbd449532d
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/OWNERS1
-rw-r--r--webkit/glue/idb_bindings.cc9
-rw-r--r--webkit/glue/idb_bindings.h5
-rw-r--r--webkit/glue/inspector_strings.grd1
-rw-r--r--webkit/glue/media/OWNERS1
-rw-r--r--webkit/glue/media/buffered_data_source.cc14
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc15
-rw-r--r--webkit/glue/media/buffered_resource_loader.cc29
-rw-r--r--webkit/glue/media/buffered_resource_loader_unittest.cc41
-rw-r--r--webkit/glue/media/simple_data_source.cc11
-rw-r--r--webkit/glue/media/simple_data_source_unittest.cc42
-rw-r--r--webkit/glue/resource_loader_bridge.h11
-rw-r--r--webkit/glue/resources/pdf_dropshadow.pngbin0 -> 325 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_0.pngbin0 -> 3248 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_1.pngbin0 -> 3478 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_2.pngbin0 -> 3467 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_3.pngbin0 -> 3593 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_4.pngbin0 -> 3524 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_5.pngbin0 -> 3595 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_6.pngbin0 -> 3549 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_7.pngbin0 -> 3598 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_8.pngbin0 -> 3394 bytes
-rw-r--r--webkit/glue/resources/pdf_progress_background.pngbin0 -> 566 bytes
-rw-r--r--webkit/glue/user_agent.cc46
-rw-r--r--webkit/glue/webaccessibility.cc6
-rw-r--r--webkit/glue/webcursor_gtk.cc8
-rw-r--r--webkit/glue/webcursor_gtk_data.h62
-rw-r--r--webkit/glue/webcursor_mac.mm19
-rw-r--r--webkit/glue/webcursor_win.cc7
-rw-r--r--webkit/glue/webkit_constants.h22
-rw-r--r--webkit/glue/webkit_glue.cc15
-rw-r--r--webkit/glue/webkit_glue.gypi18
-rw-r--r--webkit/glue/webkit_glue.h12
-rw-r--r--webkit/glue/webkit_resources.grd11
-rw-r--r--webkit/glue/webkit_strings.grd15
-rw-r--r--webkit/glue/webkitclient_impl.cc16
-rw-r--r--webkit/glue/webkitclient_impl.h7
-rw-r--r--webkit/glue/webmediaplayer_impl.cc73
-rw-r--r--webkit/glue/webmediaplayer_impl.h15
-rw-r--r--webkit/glue/webmenuitem.cc37
-rw-r--r--webkit/glue/webpreferences.cc22
-rw-r--r--webkit/glue/webpreferences.h5
-rw-r--r--webkit/glue/webthemeengine_impl_linux.cc6
-rw-r--r--webkit/glue/weburlloader_impl.cc12
44 files changed, 441 insertions, 173 deletions
diff --git a/webkit/glue/OWNERS b/webkit/glue/OWNERS
new file mode 100644
index 0000000..086939c
--- /dev/null
+++ b/webkit/glue/OWNERS
@@ -0,0 +1 @@
+tony@chromium.org
diff --git a/webkit/glue/idb_bindings.cc b/webkit/glue/idb_bindings.cc
index c565f94..633045e 100644
--- a/webkit/glue/idb_bindings.cc
+++ b/webkit/glue/idb_bindings.cc
@@ -42,4 +42,13 @@ bool IDBKeysFromValuesAndKeyPath(
return error;
}
+WebSerializedScriptValue InjectIDBKey(
+ const WebIDBKey& key,
+ const WebSerializedScriptValue& value,
+ const string16& idb_key_path) {
+ v8::Locker lock;
+ return WebIDBKey::injectIDBKeyIntoSerializedValue(
+ key, value, WebIDBKeyPath::create(idb_key_path));
+}
+
} // namespace webkit_glue
diff --git a/webkit/glue/idb_bindings.h b/webkit/glue/idb_bindings.h
index 074595d..7d7c90d 100644
--- a/webkit/glue/idb_bindings.h
+++ b/webkit/glue/idb_bindings.h
@@ -22,4 +22,9 @@ bool IDBKeysFromValuesAndKeyPath(
const string16& idb_key_path,
std::vector<WebKit::WebIDBKey>* values);
+WebKit::WebSerializedScriptValue InjectIDBKey(
+ const WebKit::WebIDBKey& key,
+ const WebKit::WebSerializedScriptValue& value,
+ const string16& idb_key_path);
+
} // namespace webkit_glue
diff --git a/webkit/glue/inspector_strings.grd b/webkit/glue/inspector_strings.grd
index 54fe5c6..d545158 100644
--- a/webkit/glue/inspector_strings.grd
+++ b/webkit/glue/inspector_strings.grd
@@ -118,6 +118,7 @@ so we include the original license below:
<if expr="pp_ifdef('use_third_party_translations')">
<file path="../../third_party/launchpad_translations/inspector_strings_ast.xtb" lang="ast" />
<file path="../../third_party/launchpad_translations/inspector_strings_ca.xtb" lang="ca" />
+ <file path="../../third_party/launchpad_translations/inspector_strings_da.xtb" lang="da" />
<file path="../../third_party/launchpad_translations/inspector_strings_de.xtb" lang="de" />
<file path="../../third_party/launchpad_translations/inspector_strings_es.xtb" lang="es" />
<file path="../../third_party/launchpad_translations/inspector_strings_eu.xtb" lang="eu" />
diff --git a/webkit/glue/media/OWNERS b/webkit/glue/media/OWNERS
new file mode 100644
index 0000000..21a33d5
--- /dev/null
+++ b/webkit/glue/media/OWNERS
@@ -0,0 +1 @@
+scherkus@chromium.org
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc
index 913d400..7902221 100644
--- a/webkit/glue/media/buffered_data_source.cc
+++ b/webkit/glue/media/buffered_data_source.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,26 +10,22 @@
using WebKit::WebFrame;
-namespace {
+namespace webkit_glue {
// Defines how long we should wait for more data before we declare a connection
// timeout and start a new request.
// TODO(hclam): Set it to 5s, calibrate this value later.
-const int kTimeoutMilliseconds = 5000;
+static const int kTimeoutMilliseconds = 5000;
// Defines how many times we should try to read from a buffered resource loader
// before we declare a read error. After each failure of read from a buffered
// resource loader, a new one is created to be read.
-const int kReadTrials = 3;
+static const int kReadTrials = 3;
// BufferedDataSource has an intermediate buffer, this value governs the initial
// size of that buffer. It is set to 32KB because this is a typical read size
// of FFmpeg.
-const int kInitialReadBufferSize = 32768;
-
-} // namespace
-
-namespace webkit_glue {
+static const int kInitialReadBufferSize = 32768;
BufferedDataSource::BufferedDataSource(
MessageLoop* render_loop,
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index f370803..41f37d6 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -30,11 +30,11 @@ using ::testing::StrictMock;
using ::testing::NiceMock;
using ::testing::WithArgs;
-namespace {
+namespace webkit_glue {
-const char* kHttpUrl = "http://test";
-const char* kFileUrl = "file://test";
-const int kDataSize = 1024;
+static const char* kHttpUrl = "http://test";
+static const char* kFileUrl = "file://test";
+static const int kDataSize = 1024;
enum NetworkState {
NONE,
@@ -42,16 +42,11 @@ enum NetworkState {
LOADING
};
-} // namespace
-
-namespace webkit_glue {
-
// A mock BufferedDataSource to inject mock BufferedResourceLoader through
// CreateResourceLoader() method.
class MockBufferedDataSource : public BufferedDataSource {
public:
- MockBufferedDataSource(
- MessageLoop* message_loop, WebFrame* frame)
+ MockBufferedDataSource(MessageLoop* message_loop, WebFrame* frame)
: BufferedDataSource(message_loop, frame) {
}
diff --git a/webkit/glue/media/buffered_resource_loader.cc b/webkit/glue/media/buffered_resource_loader.cc
index a86d2dd..4a3ae8b 100644
--- a/webkit/glue/media/buffered_resource_loader.cc
+++ b/webkit/glue/media/buffered_resource_loader.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,19 +22,19 @@ using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
using webkit_glue::MultipartResponseDelegate;
-namespace {
+namespace webkit_glue {
-const int kHttpOK = 200;
-const int kHttpPartialContent = 206;
+static const int kHttpOK = 200;
+static const int kHttpPartialContent = 206;
// Define the number of bytes in a megabyte.
-const size_t kMegabyte = 1024 * 1024;
+static const size_t kMegabyte = 1024 * 1024;
// Backward capacity of the buffer, by default 2MB.
-const size_t kBackwardCapcity = 2 * kMegabyte;
+static const size_t kBackwardCapcity = 2 * kMegabyte;
// Forward capacity of the buffer, by default 10MB.
-const size_t kForwardCapacity = 10 * kMegabyte;
+static const size_t kForwardCapacity = 10 * kMegabyte;
// The threshold of bytes that we should wait until the data arrives in the
// future instead of restarting a new connection. This number is defined in the
@@ -42,11 +42,7 @@ const size_t kForwardCapacity = 10 * kMegabyte;
// and amount of time for a suitable wait. Now I just make a guess for this
// number to be 2MB.
// TODO(hclam): determine a better value for this.
-const int kForwardWaitThreshold = 2 * kMegabyte;
-
-} // namespace
-
-namespace webkit_glue {
+static const int kForwardWaitThreshold = 2 * kMegabyte;
BufferedResourceLoader::BufferedResourceLoader(
const GURL& url,
@@ -248,18 +244,17 @@ void BufferedResourceLoader::willSendRequest(
return;
}
+ // Only allow |single_origin_| if we haven't seen a different origin yet.
+ if (single_origin_)
+ single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin();
+
if (!IsProtocolSupportedForMedia(newRequest.url())) {
// Set the url in the request to an invalid value (empty url).
newRequest.setURL(WebKit::WebURL());
DoneStart(net::ERR_ADDRESS_INVALID);
- Stop();
return;
}
- // Only allow |single_origin_| if we haven't seen a different origin yet.
- if (single_origin_)
- single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin();
-
url_ = newRequest.url();
}
diff --git a/webkit/glue/media/buffered_resource_loader_unittest.cc b/webkit/glue/media/buffered_resource_loader_unittest.cc
index dc67edf..aef44ca 100644
--- a/webkit/glue/media/buffered_resource_loader_unittest.cc
+++ b/webkit/glue/media/buffered_resource_loader_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -38,17 +38,17 @@ using WebKit::WebFrameClient;
using WebKit::WebURLResponse;
using WebKit::WebView;
-namespace {
+namespace webkit_glue {
-const char* kHttpUrl = "http://test";
-const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing";
-const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2";
-const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2";
-const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing";
+static const char* kHttpUrl = "http://test";
+static const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing";
+static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2";
+static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2";
+static const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing";
-const int kDataSize = 1024;
-const int kHttpOK = 200;
-const int kHttpPartialContent = 206;
+static const int kDataSize = 1024;
+static const int kHttpOK = 200;
+static const int kHttpPartialContent = 206;
enum NetworkState {
NONE,
@@ -56,10 +56,6 @@ enum NetworkState {
LOADING
};
-} // namespace
-
-namespace webkit_glue {
-
// Submit a request completed event to the resource loader due to request
// being canceled. Pretending the event is from external.
ACTION_P(RequestCanceled, loader) {
@@ -527,27 +523,14 @@ TEST_F(BufferedResourceLoaderTest, HasSingleOrigin) {
Initialize(kHttpUrl, -1, -1);
Start();
Redirect(kHttpRedirectToDifferentDomainUrl1);
- FullResponse(1024);
EXPECT_FALSE(loader_->HasSingleOrigin());
StopWhenLoad();
- // Test redirect twice to a different domain.
+ // Test redirect to the same domain and then to a different domain.
Initialize(kHttpUrl, -1, -1);
Start();
- Redirect(kHttpRedirectToDifferentDomainUrl1);
- Redirect(kHttpRedirectToDifferentDomainUrl2);
- FullResponse(1024);
- EXPECT_FALSE(loader_->HasSingleOrigin());
- StopWhenLoad();
-
- // Test to a different domain and then back to the same domain.
- // NOTE: A different origin was encountered at least once so that
- // makes HasSingleOrigin() become false.
- Initialize(kHttpUrl, -1, -1);
- Start();
- Redirect(kHttpRedirectToDifferentDomainUrl1);
Redirect(kHttpRedirectToSameDomainUrl1);
- FullResponse(1024);
+ Redirect(kHttpRedirectToDifferentDomainUrl1);
EXPECT_FALSE(loader_->HasSingleOrigin());
StopWhenLoad();
}
diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc
index 07f7587..5c3eb18 100644
--- a/webkit/glue/media/simple_data_source.cc
+++ b/webkit/glue/media/simple_data_source.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,14 +14,10 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h"
#include "webkit/glue/webkit_glue.h"
-namespace {
-
-const char kDataScheme[] = "data";
-
-} // namespace
-
namespace webkit_glue {
+static const char kDataScheme[] = "data";
+
SimpleDataSource::SimpleDataSource(
MessageLoop* render_loop,
WebKit::WebFrame* frame)
@@ -113,6 +109,7 @@ void SimpleDataSource::willSendRequest(
WebKit::WebURLRequest& newRequest,
const WebKit::WebURLResponse& redirectResponse) {
DCHECK(MessageLoop::current() == render_loop_);
+ base::AutoLock auto_lock(lock_);
// Only allow |single_origin_| if we haven't seen a different origin yet.
if (single_origin_)
diff --git a/webkit/glue/media/simple_data_source_unittest.cc b/webkit/glue/media/simple_data_source_unittest.cc
index a9a70a4..977807b 100644
--- a/webkit/glue/media/simple_data_source_unittest.cc
+++ b/webkit/glue/media/simple_data_source_unittest.cc
@@ -32,24 +32,20 @@ using WebKit::WebURLLoader;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
-namespace {
+namespace webkit_glue {
-const int kDataSize = 1024;
-const char kHttpUrl[] = "http://test";
-const char kHttpsUrl[] = "https://test";
-const char kFileUrl[] = "file://test";
-const char kDataUrl[] =
+static const int kDataSize = 1024;
+static const char kHttpUrl[] = "http://test";
+static const char kHttpsUrl[] = "https://test";
+static const char kFileUrl[] = "file://test";
+static const char kDataUrl[] =
"data:text/plain;base64,YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoK";
-const char kDataUrlDecoded[] = "abcdefghijklmnopqrstuvwxyz";
-const char kInvalidUrl[] = "whatever://test";
-const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing";
-const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2";
-const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2";
-const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing";
-
-} // namespace
-
-namespace webkit_glue {
+static const char kDataUrlDecoded[] = "abcdefghijklmnopqrstuvwxyz";
+static const char kInvalidUrl[] = "whatever://test";
+static const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing";
+static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2";
+static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2";
+static const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing";
class SimpleDataSourceTest : public testing::Test {
public:
@@ -259,20 +255,10 @@ TEST_F(SimpleDataSourceTest, HasSingleOrigin) {
EXPECT_FALSE(data_source_->HasSingleOrigin());
DestroyDataSource();
- // Test redirect twice to a different domain.
- InitializeDataSource(kHttpUrl, media::NewExpectedCallback());
- Redirect(kHttpRedirectToDifferentDomainUrl1);
- Redirect(kHttpRedirectToDifferentDomainUrl2);
- RequestSucceeded(false);
- EXPECT_FALSE(data_source_->HasSingleOrigin());
- DestroyDataSource();
-
- // Test to a different domain and then back to the same domain.
- // NOTE: A different origin was encountered at least once so that
- // makes HasSingleOrigin() become false.
+ // Test redirect to the same domain and then to a different domain.
InitializeDataSource(kHttpUrl, media::NewExpectedCallback());
- Redirect(kHttpRedirectToDifferentDomainUrl1);
Redirect(kHttpRedirectToSameDomainUrl1);
+ Redirect(kHttpRedirectToDifferentDomainUrl1);
RequestSucceeded(false);
EXPECT_FALSE(data_source_->HasSingleOrigin());
DestroyDataSource();
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index 23ebb35..3519269 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -31,6 +31,7 @@
#include "base/time.h"
#include "base/values.h"
#include "googleurl/src/gurl.h"
+#include "net/base/host_port_pair.h"
#include "net/url_request/url_request_status.h"
#include "webkit/glue/resource_type.h"
@@ -182,6 +183,9 @@ struct ResourceResponseInfo {
// transparent proxy). The proxy could be any type of proxy, HTTP or SOCKS.
// Note: we cannot tell if a transparent proxy may have been involved.
bool was_fetched_via_proxy;
+
+ // Remote address of the socket which fetched this resource.
+ net::HostPortPair socket_address;
};
class ResourceLoaderBridge {
@@ -286,11 +290,8 @@ class ResourceLoaderBridge {
GURL* new_first_party_for_cookies) = 0;
// Called when response headers are available (after all redirects have
- // been followed). |content_filtered| is set to true if the contents is
- // altered or replaced (usually for security reasons when the resource is
- // deemed unsafe).
- virtual void OnReceivedResponse(const ResourceResponseInfo& info,
- bool content_filtered) = 0;
+ // been followed).
+ virtual void OnReceivedResponse(const ResourceResponseInfo& info) = 0;
// Called when a chunk of response data is downloaded. This method may be
// called multiple times or not at all if an error occurs. This method is
diff --git a/webkit/glue/resources/pdf_dropshadow.png b/webkit/glue/resources/pdf_dropshadow.png
new file mode 100644
index 0000000..024cfc5
--- /dev/null
+++ b/webkit/glue/resources/pdf_dropshadow.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_0.png b/webkit/glue/resources/pdf_progress_0.png
new file mode 100644
index 0000000..42cc639
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_0.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_1.png b/webkit/glue/resources/pdf_progress_1.png
new file mode 100644
index 0000000..96ac812
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_1.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_2.png b/webkit/glue/resources/pdf_progress_2.png
new file mode 100644
index 0000000..83d382d
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_2.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_3.png b/webkit/glue/resources/pdf_progress_3.png
new file mode 100644
index 0000000..c80cdef
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_3.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_4.png b/webkit/glue/resources/pdf_progress_4.png
new file mode 100644
index 0000000..9583531
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_4.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_5.png b/webkit/glue/resources/pdf_progress_5.png
new file mode 100644
index 0000000..5fc020f
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_5.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_6.png b/webkit/glue/resources/pdf_progress_6.png
new file mode 100644
index 0000000..8d22571
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_6.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_7.png b/webkit/glue/resources/pdf_progress_7.png
new file mode 100644
index 0000000..5e9477d
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_7.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_8.png b/webkit/glue/resources/pdf_progress_8.png
new file mode 100644
index 0000000..ae89636
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_8.png
Binary files differ
diff --git a/webkit/glue/resources/pdf_progress_background.png b/webkit/glue/resources/pdf_progress_background.png
new file mode 100644
index 0000000..420b69d
--- /dev/null
+++ b/webkit/glue/resources/pdf_progress_background.png
Binary files differ
diff --git a/webkit/glue/user_agent.cc b/webkit/glue/user_agent.cc
index afd1c83..04fab21 100644
--- a/webkit/glue/user_agent.cc
+++ b/webkit/glue/user_agent.cc
@@ -12,6 +12,10 @@
#include "base/stringprintf.h"
#include "base/sys_info.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
// Generated
#include "webkit_version.h" // NOLINT
@@ -58,12 +62,27 @@ std::string BuildOSCpuInfo() {
}
#endif
+#if defined(OS_WIN)
+ std::string architecture_token;
+ if (base::win::GetWOW64Status() == base::win::WOW64_ENABLED) {
+ architecture_token = "; WOW64";
+ } else {
+ base::win::WindowsArchitecture windows_architecture =
+ base::win::GetWindowsArchitecture();
+ if (windows_architecture == base::win::X64_ARCHITECTURE)
+ architecture_token = "; Win64; x64";
+ else if (windows_architecture == base::win::IA64_ARCHITECTURE)
+ architecture_token = "; Win64; IA64";
+ }
+#endif
+
base::StringAppendF(
&os_cpu,
#if defined(OS_WIN)
- "Windows NT %d.%d",
+ "Windows NT %d.%d%s",
os_major_version,
- os_minor_version
+ os_minor_version,
+ architecture_token.c_str()
#elif defined(OS_MACOSX)
"Intel Mac OS X %d_%d_%d",
os_major_version,
@@ -71,7 +90,7 @@ std::string BuildOSCpuInfo() {
os_bugfix_version
#elif defined(OS_CHROMEOS)
"CrOS %s %d.%d.%d",
- cputype.c_str(), // e.g. i686
+ cputype.c_str(), // e.g. i686
os_major_version,
os_minor_version,
os_bugfix_version
@@ -88,20 +107,15 @@ std::string BuildOSCpuInfo() {
void BuildUserAgent(bool mimic_windows, std::string* result) {
const char kUserAgentPlatform[] =
#if defined(OS_WIN)
- "Windows";
+ "";
#elif defined(OS_MACOSX)
- "Macintosh";
+ "Macintosh; ";
#elif defined(USE_X11)
- "X11"; // strange, but that's what Firefox uses
+ "X11; "; // strange, but that's what Firefox uses
#else
- "?";
+ "Unknown; ";
#endif
- const char kUserAgentSecurity = 'U'; // "US" strength encryption
-
- // TODO(port): figure out correct locale
- const char kUserAgentLocale[] = "en-US";
-
// Get the product name and version, and replace Safari's Version/X string
// with it. This is done to expose our product name in a manner that is
// maximally compatible with Safari, we hope!!
@@ -110,12 +124,10 @@ void BuildUserAgent(bool mimic_windows, std::string* result) {
// Derived from Safari's UA string.
base::StringAppendF(
result,
- "Mozilla/5.0 (%s; %c; %s; %s) AppleWebKit/%d.%d"
+ "Mozilla/5.0 (%s%s) AppleWebKit/%d.%d"
" (KHTML, like Gecko) %s Safari/%d.%d",
- mimic_windows ? "Windows" : kUserAgentPlatform,
- kUserAgentSecurity,
- ((mimic_windows ? "Windows " : "") + BuildOSCpuInfo()).c_str(),
- kUserAgentLocale,
+ mimic_windows ? "Windows " : kUserAgentPlatform,
+ BuildOSCpuInfo().c_str(),
WEBKIT_VERSION_MAJOR,
WEBKIT_VERSION_MINOR,
product.c_str(),
diff --git a/webkit/glue/webaccessibility.cc b/webkit/glue/webaccessibility.cc
index b96266b..f6df3b2 100644
--- a/webkit/glue/webaccessibility.cc
+++ b/webkit/glue/webaccessibility.cc
@@ -380,6 +380,12 @@ void WebAccessibility::Init(const WebKit::WebAccessibilityObject& src,
// Add the source object to the cache and store its id.
id = cache->addOrGetId(src);
+ if (role == WebAccessibility::ROLE_EDITABLE_TEXT ||
+ role == WebAccessibility::ROLE_TEXTAREA ||
+ role == WebAccessibility::ROLE_TEXT_FIELD) {
+ include_children = false;
+ }
+
if (include_children) {
// Recursively create children.
int child_count = src.childCount();
diff --git a/webkit/glue/webcursor_gtk.cc b/webkit/glue/webcursor_gtk.cc
index ca3555a..c315b2a 100644
--- a/webkit/glue/webcursor_gtk.cc
+++ b/webkit/glue/webcursor_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -153,6 +153,8 @@ int WebCursor::GetCursorType() const {
NOTIMPLEMENTED(); return GDK_LAST_CURSOR;
case WebCursorInfo::TypeZoomIn:
case WebCursorInfo::TypeZoomOut:
+ case WebCursorInfo::TypeGrab:
+ case WebCursorInfo::TypeGrabbing:
case WebCursorInfo::TypeCustom:
return GDK_CURSOR_IS_PIXMAP;
}
@@ -178,6 +180,10 @@ GdkCursor* WebCursor::GetCustomCursor() {
return GetInlineCustomCursor(CustomCursorZoomIn);
case WebCursorInfo::TypeZoomOut:
return GetInlineCustomCursor(CustomCursorZoomOut);
+ case WebCursorInfo::TypeGrab:
+ return GetInlineCustomCursor(CustomCursorGrab);
+ case WebCursorInfo::TypeGrabbing:
+ return GetInlineCustomCursor(CustomCursorGrabbing);
}
if (type_ != WebCursorInfo::TypeCustom) {
diff --git a/webkit/glue/webcursor_gtk_data.h b/webkit/glue/webcursor_gtk_data.h
index 8bffcb7..a983143 100644
--- a/webkit/glue/webcursor_gtk_data.h
+++ b/webkit/glue/webcursor_gtk_data.h
@@ -193,14 +193,70 @@ static const char moz_zoom_out_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+/* MOZ_CURSOR_HAND_GRAB */
+static const char moz_hand_grab_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+ 0x60, 0x39, 0x00, 0x00, 0x90, 0x49, 0x00, 0x00, 0x90, 0x49, 0x01, 0x00,
+ 0x20, 0xc9, 0x02, 0x00, 0x20, 0x49, 0x02, 0x00, 0x58, 0x40, 0x02, 0x00,
+ 0x64, 0x00, 0x02, 0x00, 0x44, 0x00, 0x01, 0x00, 0x08, 0x00, 0x01, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x10, 0x80, 0x00, 0x00, 0x20, 0x80, 0x00, 0x00,
+ 0x40, 0x40, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+static const char moz_hand_grab_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00,
+ 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0xff, 0x01, 0x00, 0xf8, 0xff, 0x03, 0x00,
+ 0xf0, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x07, 0x00, 0xfc, 0xff, 0x07, 0x00,
+ 0xfe, 0xff, 0x07, 0x00, 0xfe, 0xff, 0x03, 0x00, 0xfc, 0xff, 0x03, 0x00,
+ 0xf8, 0xff, 0x03, 0x00, 0xf8, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x01, 0x00,
+ 0xe0, 0xff, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+/* MOZ_CURSOR_HAND_GRABBING */
+static const char moz_hand_grabbing_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0x36, 0x00, 0x00, 0x20, 0xc9, 0x00, 0x00, 0x20, 0x40, 0x01, 0x00,
+ 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x01, 0x00, 0x10, 0x00, 0x01, 0x00,
+ 0x10, 0x00, 0x01, 0x00, 0x10, 0x80, 0x00, 0x00, 0x20, 0x80, 0x00, 0x00,
+ 0x40, 0x40, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
+static const char moz_hand_grabbing_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x36, 0x00, 0x00,
+ 0xe0, 0xff, 0x00, 0x00, 0xf0, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x03, 0x00,
+ 0xe0, 0xff, 0x03, 0x00, 0xf0, 0xff, 0x03, 0x00, 0xf8, 0xff, 0x03, 0x00,
+ 0xf8, 0xff, 0x03, 0x00, 0xf8, 0xff, 0x01, 0x00, 0xf0, 0xff, 0x01, 0x00,
+ 0xe0, 0xff, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
enum CustomCursorType {
CustomCursorCopy = 0,
CustomCursorAlias,
CustomCursorContextMenu,
CustomCursorZoomIn,
CustomCursorZoomOut,
- CustomCursorVerticalText
-} ;
+ CustomCursorVerticalText,
+ CustomCursorGrab,
+ CustomCursorGrabbing,
+};
typedef struct {
const char* name;
@@ -218,6 +274,8 @@ static const CustomCursor CustomCursors[] = {
{ "zoom-in", moz_zoom_in_bits, moz_zoom_in_mask_bits, 6, 6 },
{ "zoom-out", moz_zoom_out_bits, moz_zoom_out_mask_bits, 6, 6 },
{ "vertical-text", moz_vertical_text_bits, moz_vertical_text_mask_bits, 8, 4 },
+ { "grab", moz_hand_grab_bits, moz_hand_grab_mask_bits, 10, 10 },
+ { "grabbing", moz_hand_grabbing_bits, moz_hand_grabbing_mask_bits, 10, 10 }
};
// This cursor intentionally left out of above structs. It is only used by
diff --git a/webkit/glue/webcursor_mac.mm b/webkit/glue/webcursor_mac.mm
index 680521d..da80efa 100644
--- a/webkit/glue/webcursor_mac.mm
+++ b/webkit/glue/webcursor_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -153,6 +153,10 @@ NSCursor* WebCursor::GetCursor() const {
return LoadCursor("zoomInCursor", 7, 7);
case WebCursorInfo::TypeZoomOut:
return LoadCursor("zoomOutCursor", 7, 7);
+ case WebCursorInfo::TypeGrab:
+ return [NSCursor openHandCursor];
+ case WebCursorInfo::TypeGrabbing:
+ return [NSCursor closedHandCursor];
case WebCursorInfo::TypeCustom:
return CreateCustomCursor(custom_data_, custom_size_, hotspot_);
}
@@ -192,7 +196,11 @@ void WebCursor::InitFromThemeCursor(ThemeCursor cursor) {
cursor_info.type = WebCursorInfo::TypeWait;
break;
case kThemeClosedHandCursor:
+ cursor_info.type = WebCursorInfo::TypeGrabbing;
+ break;
case kThemeOpenHandCursor:
+ cursor_info.type = WebCursorInfo::TypeGrab;
+ break;
case kThemePointingHandCursor:
case kThemeCountingUpHandCursor:
case kThemeCountingDownHandCursor:
@@ -297,10 +305,13 @@ void WebCursor::InitFromNSCursor(NSCursor* cursor) {
cursor_info.type = WebCursorInfo::TypeSouthResize;
} else if ([cursor isEqual:[NSCursor resizeUpDownCursor]]) {
cursor_info.type = WebCursorInfo::TypeNorthSouthResize;
+ } else if ([cursor isEqual:[NSCursor openHandCursor]]) {
+ cursor_info.type = WebCursorInfo::TypeGrab;
+ } else if ([cursor isEqual:[NSCursor closedHandCursor]]) {
+ cursor_info.type = WebCursorInfo::TypeGrabbing;
} else {
- // Also handles the [NSCursor closedHandCursor], [NSCursor openHandCursor],
- // and [NSCursor disappearingItemCursor] cases. Quick-and-dirty image
- // conversion; TODO(avi): do better.
+ // Also handles the [NSCursor disappearingItemCursor] case. Quick-and-dirty
+ // image conversion; TODO(avi): do better.
CGImageRef cg_image = nil;
NSImage* image = [cursor image];
for (id rep in [image representations]) {
diff --git a/webkit/glue/webcursor_win.cc b/webkit/glue/webcursor_win.cc
index 3399c7c..2acab4d 100644
--- a/webkit/glue/webcursor_win.cc
+++ b/webkit/glue/webcursor_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -96,6 +96,11 @@ static LPCWSTR ToCursorID(WebCursorInfo::Type type) {
return MAKEINTRESOURCE(IDC_ZOOMIN);
case WebCursorInfo::TypeZoomOut:
return MAKEINTRESOURCE(IDC_ZOOMOUT);
+ // TODO(avi): get cursor images for grab/grabbing
+ // http://crbug.com/74699
+ case WebCursorInfo::TypeGrab:
+ case WebCursorInfo::TypeGrabbing:
+ return IDC_ARROW;
}
NOTREACHED();
return NULL;
diff --git a/webkit/glue/webkit_constants.h b/webkit/glue/webkit_constants.h
new file mode 100644
index 0000000..a209b52
--- /dev/null
+++ b/webkit/glue/webkit_constants.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
+#define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
+
+namespace webkit_glue {
+
+// Chromium sets the minimum interval timeout to 4ms, overriding the
+// default of 10ms. We'd like to go lower, however there are poorly
+// coded websites out there which do create CPU-spinning loops. Using
+// 4ms prevents the CPU from spinning too busily and provides a balance
+// between CPU spinning and the smallest possible interval timer.
+const double kForegroundTabTimerInterval = 0.004;
+
+// Provides control over the minimum timer interval for background tabs.
+const double kBackgroundTabTimerInterval = 1.0;
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index 6d76c71..227bfe7 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -15,6 +15,7 @@
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/string_piece.h"
+#include "base/string_tokenizer.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/sys_info.h"
@@ -80,8 +81,13 @@ void SetJavaScriptFlags(const std::string& str) {
#endif
}
-void EnableWebCoreNotImplementedLogging() {
- WebKit::enableLogChannel("NotYetImplemented");
+void EnableWebCoreLogChannels(const std::string& channels) {
+ if (channels.empty())
+ return;
+ StringTokenizer t(channels, ", ");
+ while (t.GetNext()) {
+ WebKit::enableLogChannel(t.token().c_str());
+ }
}
string16 DumpDocumentText(WebFrame* web_frame) {
@@ -308,10 +314,11 @@ WebKit::WebFileError PlatformFileErrorToWebFileError(
return WebKit::WebFileErrorNotFound;
case base::PLATFORM_FILE_ERROR_INVALID_OPERATION:
case base::PLATFORM_FILE_ERROR_EXISTS:
- case base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY:
- case base::PLATFORM_FILE_ERROR_NOT_A_FILE:
case base::PLATFORM_FILE_ERROR_NOT_EMPTY:
return WebKit::WebFileErrorInvalidModification;
+ case base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY:
+ case base::PLATFORM_FILE_ERROR_NOT_A_FILE:
+ return WebKit::WebFileErrorTypeMismatch;
case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
return WebKit::WebFileErrorNoModificationAllowed;
case base::PLATFORM_FILE_ERROR_FAILED:
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 4a3d03f..e742b8f 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -166,6 +166,8 @@
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
+ '<(DEPTH)/third_party/libjingle/libjingle.gyp:libjingle',
+ '<(DEPTH)/third_party/libjingle/libjingle.gyp:libjingle_p2p',
'<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
'<(DEPTH)/ppapi/ppapi.gyp:ppapi_c',
'webkit_resources',
@@ -261,6 +263,8 @@
'../plugins/ppapi/event_conversion.h',
'../plugins/ppapi/file_callbacks.cc',
'../plugins/ppapi/file_callbacks.h',
+ '../plugins/ppapi/file_path.cc',
+ '../plugins/ppapi/file_path.h',
'../plugins/ppapi/fullscreen_container.h',
'../plugins/ppapi/npapi_glue.cc',
'../plugins/ppapi/npapi_glue.h',
@@ -293,11 +297,17 @@
'../plugins/ppapi/ppb_file_ref_impl.h',
'../plugins/ppapi/ppb_file_system_impl.cc',
'../plugins/ppapi/ppb_file_system_impl.h',
+ '../plugins/ppapi/ppb_flash_clipboard_impl.cc',
+ '../plugins/ppapi/ppb_flash_clipboard_impl.h',
+ '../plugins/ppapi/ppb_flash_file_impl.cc',
+ '../plugins/ppapi/ppb_flash_file_impl.h',
'../plugins/ppapi/ppb_flash_impl.cc',
'../plugins/ppapi/ppb_flash_impl.h',
'../plugins/ppapi/ppb_flash_impl_linux.cc',
'../plugins/ppapi/ppb_flash_menu_impl.cc',
'../plugins/ppapi/ppb_flash_menu_impl.h',
+ '../plugins/ppapi/ppb_flash_net_connector_impl.cc',
+ '../plugins/ppapi/ppb_flash_net_connector_impl.h',
'../plugins/ppapi/ppb_font_impl.cc',
'../plugins/ppapi/ppb_font_impl.h',
'../plugins/ppapi/ppb_gles_chromium_texture_mapping_impl.cc',
@@ -314,6 +324,8 @@
'../plugins/ppapi/ppb_opengles_impl.h',
'../plugins/ppapi/ppb_pdf_impl.cc',
'../plugins/ppapi/ppb_pdf_impl.h',
+ '../plugins/ppapi/ppb_proxy_impl.cc',
+ '../plugins/ppapi/ppb_proxy_impl.h',
'../plugins/ppapi/ppb_scrollbar_impl.cc',
'../plugins/ppapi/ppb_scrollbar_impl.h',
'../plugins/ppapi/ppb_surface_3d_impl.cc',
@@ -418,6 +430,7 @@
'webdropdata.h',
'webfileutilities_impl.cc',
'webfileutilities_impl.h',
+ 'webkit_constants.h',
'webkit_glue.cc',
'webkit_glue.h',
'webkitclient_impl.cc',
@@ -499,11 +512,6 @@
'../plugins/ppapi/ppb_open_gl_es_impl.cc',
],
}],
- ['enable_gpu==1', {
- 'dependencies': [
- '<(DEPTH)/gpu/gpu.gyp:gpu_plugin',
- ],
- }],
['OS!="win"', {
'sources/': [['exclude', '_win\\.cc$']],
'sources!': [
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index 5df2aea..c1f45e6 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -51,8 +51,8 @@ namespace webkit_glue {
void SetJavaScriptFlags(const std::string& flags);
-// Turn on the logging for notImplemented() calls from WebCore.
-void EnableWebCoreNotImplementedLogging();
+// Turn on logging for flags in the provided comma delimited list.
+void EnableWebCoreLogChannels(const std::string& channels);
// Returns the text of the document element.
string16 DumpDocumentText(WebKit::WebFrame* web_frame);
@@ -164,10 +164,6 @@ void PrecacheUrl(const char16* url, int url_length);
// This function is called to add a line to the application's log file.
void AppendToLog(const char* filename, int line, const char* message);
-// Gather usage statistics from the in-memory cache and inform our host, if
-// applicable.
-void NotifyCacheStats();
-
// Glue to get resources from the embedder.
// Gets a localized string given a message id. Returns an empty string if the
@@ -265,7 +261,9 @@ void CloseCurrentConnections();
void SetCacheMode(bool enabled);
// Clear the disk cache. Used for debugging.
-void ClearCache();
+// |preserve_ssl_host_info| indicates whether disk cache entries related to
+// SSL information should be purged.
+void ClearCache(bool preserve_ssl_host_info);
// Returns the product version. E.g., Chrome/4.1.333.0
std::string GetProductVersion();
diff --git a/webkit/glue/webkit_resources.grd b/webkit/glue/webkit_resources.grd
index a11dae9..20b684c 100644
--- a/webkit/glue/webkit_resources.grd
+++ b/webkit/glue/webkit_resources.grd
@@ -76,6 +76,17 @@
<include name="IDR_PDF_THUMBNAIL_8" file="resources\pdf_thumbnail_8.png" type="BINDATA" />
<include name="IDR_PDF_THUMBNAIL_9" file="resources\pdf_thumbnail_9.png" type="BINDATA" />
<include name="IDR_PDF_THUMBNAIL_NUM_BACKGROUND" file="resources\pdf_thumbnail_num_background.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_0" file="resources\pdf_progress_0.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_1" file="resources\pdf_progress_1.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_2" file="resources\pdf_progress_2.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_3" file="resources\pdf_progress_3.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_4" file="resources\pdf_progress_4.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_5" file="resources\pdf_progress_5.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_6" file="resources\pdf_progress_6.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_7" file="resources\pdf_progress_7.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_8" file="resources\pdf_progress_8.png" type="BINDATA" />
+ <include name="IDR_PDF_PROGRESS_BAR_BACKGROUND" file="resources\pdf_progress_background.png" type="BINDATA" />
+ <include name="IDR_PDF_PAGE_DROPSHADOW" file="resources\pdf_dropshadow.png" type="BINDATA" />
</includes>
</release>
</grit>
diff --git a/webkit/glue/webkit_strings.grd b/webkit/glue/webkit_strings.grd
index ae88dc9..da121e7 100644
--- a/webkit/glue/webkit_strings.grd
+++ b/webkit/glue/webkit_strings.grd
@@ -203,6 +203,7 @@ below:
<!-- The translation console uses 'iw' for Hebrew, but we use 'he'. -->
<file path="resources/webkit_strings_iw.xtb" lang="he" />
<file path="resources/webkit_strings_ja.xtb" lang="ja" />
+ <file path="../../third_party/launchpad_translations/webkit_strings_ka.xtb" lang="ka" />
<file path="resources/webkit_strings_kn.xtb" lang="kn" />
<file path="resources/webkit_strings_ko.xtb" lang="ko" />
<file path="../../third_party/launchpad_translations/webkit_strings_ku.xtb" lang="ku" />
@@ -408,11 +409,15 @@ below:
</message>
<message name="IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG" desc="Message displayed by the default plugin in its main window">
- <ph name="PLUGIN">$1<ex>Realplayer</ex></ph> plug-in is not installed
+ <ph name="PLUGIN">$1<ex>Realplayer</ex></ph> plug-in is not installed.
</message>
<message name="IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_NO_PLUGIN_NAME" desc="Message displayed by the default plugin in its main window when we don't know the plugin name">
- The required plug-in is not installed
+ The required plug-in is not installed.
+ </message>
+
+ <message name="IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_PLUGIN_FINDER_DISABLED" desc="Message displayed by the default plugin in its main window when the plugin finder has been disabled by a policy.">
+ Installing plug-ins has been disabled.
</message>
<message name="IDS_DEFAULT_PLUGIN_GET_PLUGIN_MSG_2" desc="Second Message displayed by the default plugin in its main window">
@@ -424,7 +429,7 @@ below:
</message>
<message name="IDS_DEFAULT_PLUGIN_NO_PLUGIN_AVAILABLE_MSG" desc="Message displayed by the default plugin when no plugin was found for the page.">
- No plug-in available to display this content
+ No plug-in available to display this content.
</message>
<message name="IDS_DEFAULT_PLUGIN_DOWNLOADING_PLUGIN_MSG" desc="Message displayed by the default plugin when a download has been initiated for the third party plugin.">
@@ -485,6 +490,10 @@ below:
Failed to load PDF document
</message>
+ <message name="IDS_PDF_PROGRESS_LOADING" desc="A message displayed on the progress control over PDF page during document loading.">
+ Loading
+ </message>
+
</messages>
</release>
</grit>
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 701d5c3..3a47de4 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -14,10 +14,11 @@
#include "base/debug/trace_event.h"
#include "base/message_loop.h"
-#include "base/metrics/stats_counters.h"
#include "base/metrics/histogram.h"
-#include "base/process_util.h"
+#include "base/metrics/stats_counters.h"
#include "base/platform_file.h"
+#include "base/process_util.h"
+#include "base/rand_util.h"
#include "base/singleton.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
@@ -445,6 +446,17 @@ double WebKitClientImpl::currentTime() {
return base::Time::Now().ToDoubleT();
}
+void WebKitClientImpl::cryptographicallyRandomValues(
+ unsigned char* buffer, size_t length) {
+ uint64 bytes = 0;
+ for (size_t i = 0; i < length; ++i) {
+ size_t offset = i % sizeof(bytes);
+ if (!offset)
+ bytes = base::RandUint64();
+ buffer[i] = reinterpret_cast<unsigned char*>(&bytes)[offset];
+ }
+}
+
void WebKitClientImpl::setSharedTimerFiredFunction(void (*func)()) {
shared_timer_func_ = func;
}
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h
index 302a99f..22cb220 100644
--- a/webkit/glue/webkitclient_impl.h
+++ b/webkit/glue/webkitclient_impl.h
@@ -68,6 +68,8 @@ class WebKitClientImpl : public WebKit::WebKitClient {
const WebKit::WebString& value1, const WebKit::WebString& value2);
virtual void suddenTerminationChanged(bool enabled) { }
virtual double currentTime();
+ virtual void cryptographicallyRandomValues(
+ unsigned char* buffer, size_t length);
virtual void setSharedTimerFiredFunction(void (*func)());
virtual void setSharedTimerFireTime(double fireTime);
virtual void stopSharedTimer();
@@ -76,12 +78,15 @@ class WebKitClientImpl : public WebKit::WebKitClient {
void SuspendSharedTimer();
void ResumeSharedTimer();
- private:
+ // Hack for http://crbug.com/71735.
+ // TODO(jamesr): move this back to the private section once
+ // http://crbug.com/72007 is fixed.
void DoTimeout() {
if (shared_timer_func_ && !shared_timer_suspended_)
shared_timer_func_();
}
+ private:
MessageLoop* main_loop_;
base::OneShotTimer<WebKitClientImpl> shared_timer_;
void (*shared_timer_func_)();
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index 9d51910..eda79f5 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -113,9 +113,10 @@ void WebMediaPlayerImpl::Proxy::SetVideoRenderer(
video_renderer_ = video_renderer;
}
-void WebMediaPlayerImpl::Proxy::SetDataSource(
+void WebMediaPlayerImpl::Proxy::AddDataSource(
scoped_refptr<WebDataSource> data_source) {
- data_source_ = data_source;
+ base::AutoLock auto_lock(data_sources_lock_);
+ data_sources_.push_back(data_source);
}
void WebMediaPlayerImpl::Proxy::Paint(skia::PlatformCanvas* canvas,
@@ -135,16 +136,26 @@ void WebMediaPlayerImpl::Proxy::SetSize(const gfx::Rect& rect) {
bool WebMediaPlayerImpl::Proxy::HasSingleOrigin() {
DCHECK(MessageLoop::current() == render_loop_);
- if (data_source_) {
- return data_source_->HasSingleOrigin();
+
+ base::AutoLock auto_lock(data_sources_lock_);
+
+ for (DataSourceList::iterator itr = data_sources_.begin();
+ itr != data_sources_.end();
+ itr++) {
+ if (!(*itr)->HasSingleOrigin())
+ return false;
}
return true;
}
-void WebMediaPlayerImpl::Proxy::AbortDataSource() {
+void WebMediaPlayerImpl::Proxy::AbortDataSources() {
DCHECK(MessageLoop::current() == render_loop_);
- if (data_source_) {
- data_source_->Abort();
+ base::AutoLock auto_lock(data_sources_lock_);
+
+ for (DataSourceList::iterator itr = data_sources_.begin();
+ itr != data_sources_.end();
+ itr++) {
+ (*itr)->Abort();
}
}
@@ -152,7 +163,11 @@ void WebMediaPlayerImpl::Proxy::Detach() {
DCHECK(MessageLoop::current() == render_loop_);
webmediaplayer_ = NULL;
video_renderer_ = NULL;
- data_source_ = NULL;
+
+ {
+ base::AutoLock auto_lock(data_sources_lock_);
+ data_sources_.clear();
+ }
}
void WebMediaPlayerImpl::Proxy::PipelineInitializationCallback() {
@@ -300,7 +315,7 @@ bool WebMediaPlayerImpl::Initialize(
// A sophisticated data source that does memory caching.
scoped_refptr<BufferedDataSource> buffered_data_source(
new BufferedDataSource(MessageLoop::current(), frame));
- proxy_->SetDataSource(buffered_data_source);
+ proxy_->AddDataSource(buffered_data_source);
if (use_simple_data_source) {
filter_collection_->AddDataSource(simple_data_source);
@@ -656,6 +671,38 @@ WebKit::WebMediaPlayer::MovieLoadType
return WebKit::WebMediaPlayer::Unknown;
}
+unsigned WebMediaPlayerImpl::decodedFrameCount() const
+{
+ DCHECK(MessageLoop::current() == main_loop_);
+
+ media::PipelineStatistics stats = pipeline_->GetStatistics();
+ return stats.video_frames_decoded;
+}
+
+unsigned WebMediaPlayerImpl::droppedFrameCount() const
+{
+ DCHECK(MessageLoop::current() == main_loop_);
+
+ media::PipelineStatistics stats = pipeline_->GetStatistics();
+ return stats.video_frames_dropped;
+}
+
+unsigned WebMediaPlayerImpl::audioDecodedByteCount() const
+{
+ DCHECK(MessageLoop::current() == main_loop_);
+
+ media::PipelineStatistics stats = pipeline_->GetStatistics();
+ return stats.audio_bytes_decoded;
+}
+
+unsigned WebMediaPlayerImpl::videoDecodedByteCount() const
+{
+ DCHECK(MessageLoop::current() == main_loop_);
+
+ media::PipelineStatistics stats = pipeline_->GetStatistics();
+ return stats.video_bytes_decoded;
+}
+
WebKit::WebVideoFrame* WebMediaPlayerImpl::getCurrentFrame() {
scoped_refptr<media::VideoFrame> video_frame;
proxy_->GetCurrentFrame(&video_frame);
@@ -778,8 +825,12 @@ void WebMediaPlayerImpl::OnNetworkEvent() {
// If we are inactive because we just finished receiving all the data,
// do one final repaint to show final progress.
if (bytesLoaded() == totalBytes() &&
- network_state_ != WebKit::WebMediaPlayer::Idle)
+ network_state_ != WebKit::WebMediaPlayer::Idle) {
Repaint();
+
+ SetNetworkState(WebKit::WebMediaPlayer::Loaded);
+ }
+
SetNetworkState(WebKit::WebMediaPlayer::Idle);
}
}
@@ -807,7 +858,7 @@ void WebMediaPlayerImpl::Destroy() {
// Tell the data source to abort any pending reads so that the pipeline is
// not blocked when issuing stop commands to the other filters.
if (proxy_)
- proxy_->AbortDataSource();
+ proxy_->AbortDataSources();
// Make sure to kill the pipeline so there's no more media threads running.
// Note: stopping the pipeline might block for a long time.
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index cfc200f..cadf4d7 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -99,7 +99,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// Methods for Filter -> WebMediaPlayerImpl communication.
void Repaint();
void SetVideoRenderer(scoped_refptr<WebVideoRenderer> video_renderer);
- void SetDataSource(scoped_refptr<WebDataSource> data_source);
+ void AddDataSource(scoped_refptr<WebDataSource> data_source);
// Methods for WebMediaPlayerImpl -> Filter communication.
void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect);
@@ -108,7 +108,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out);
void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame);
bool HasSingleOrigin();
- void AbortDataSource();
+ void AbortDataSources();
// Methods for PipelineImpl -> WebMediaPlayerImpl communication.
void PipelineInitializationCallback();
@@ -146,7 +146,11 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// The render message loop where WebKit lives.
MessageLoop* render_loop_;
WebMediaPlayerImpl* webmediaplayer_;
- scoped_refptr<WebDataSource> data_source_;
+
+ base::Lock data_sources_lock_;
+ typedef std::list<scoped_refptr<WebDataSource> > DataSourceList;
+ DataSourceList data_sources_;
+
scoped_refptr<WebVideoRenderer> video_renderer_;
base::Lock lock_;
@@ -237,6 +241,11 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
virtual bool hasSingleSecurityOrigin() const;
virtual WebKit::WebMediaPlayer::MovieLoadType movieLoadType() const;
+ virtual unsigned decodedFrameCount() const;
+ virtual unsigned droppedFrameCount() const;
+ virtual unsigned audioDecodedByteCount() const;
+ virtual unsigned videoDecodedByteCount() const;
+
virtual WebKit::WebVideoFrame* getCurrentFrame();
virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame);
diff --git a/webkit/glue/webmenuitem.cc b/webkit/glue/webmenuitem.cc
new file mode 100644
index 0000000..2a24195
--- /dev/null
+++ b/webkit/glue/webmenuitem.cc
@@ -0,0 +1,37 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/glue/webmenuitem.h"
+
+WebMenuItem::WebMenuItem()
+ : type(OPTION),
+ action(0),
+ rtl(false),
+ has_directional_override(false),
+ enabled(false),
+ checked(false) {
+}
+
+WebMenuItem::WebMenuItem(const WebKit::WebMenuItemInfo& item)
+ : label(item.label),
+ type(static_cast<Type>(item.type)),
+ action(item.action),
+ rtl(item.textDirection == WebKit::WebTextDirectionRightToLeft),
+ has_directional_override(item.hasTextDirectionOverride),
+ enabled(item.enabled),
+ checked(item.checked) {
+}
+
+WebMenuItem::WebMenuItem(const WebMenuItem& item)
+ : label(item.label),
+ type(item.type),
+ action(item.action),
+ rtl(item.rtl),
+ has_directional_override(item.has_directional_override),
+ enabled(item.enabled),
+ checked(item.checked),
+ submenu(item.submenu) {
+}
+
+WebMenuItem::~WebMenuItem() {}
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index 03c87bf..ab359a2 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -64,13 +64,18 @@ WebPreferences::WebPreferences()
experimental_webgl_enabled(false),
gl_multisampling_enabled(true),
show_composited_layer_borders(false),
+ show_composited_layer_tree(false),
+ show_fps_counter(false),
+ asynchronous_spell_checking_enabled(true),
accelerated_compositing_enabled(false),
+ composite_to_texture_enabled(false),
accelerated_layers_enabled(false),
accelerated_video_enabled(false),
accelerated_2d_canvas_enabled(false),
accelerated_plugins_enabled(false),
memory_info_enabled(false),
- interactive_form_validation_enabled(true) {
+ interactive_form_validation_enabled(true),
+ fullscreen_enabled(false) {
}
WebPreferences::~WebPreferences() {
@@ -160,9 +165,19 @@ void WebPreferences::Apply(WebView* web_view) const {
// on command line.
settings->setShowDebugBorders(show_composited_layer_borders);
+ // Display an FPS indicator if requested on the command line.
+ settings->setShowFPSCounter(show_fps_counter);
+
+ // Display the current compositor tree as overlay if requested on
+ // the command line
+ settings->setShowPlatformLayerTree(show_composited_layer_tree);
+
// Enable gpu-accelerated compositing if requested on the command line.
settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled);
+ // Enable composite to offscreen texture if requested on the command line.
+ settings->setCompositeToTextureEnabled(composite_to_texture_enabled);
+
// Enable gpu-accelerated 2d canvas if requested on the command line.
settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled);
@@ -186,6 +201,9 @@ void WebPreferences::Apply(WebView* web_view) const {
// Enable memory info reporting to page if requested on the command line.
settings->setMemoryInfoEnabled(memory_info_enabled);
+ settings->setAsynchronousSpellCheckingEnabled(
+ asynchronous_spell_checking_enabled);
+
for (WebInspectorPreferences::const_iterator it = inspector_settings.begin();
it != inspector_settings.end(); ++it)
web_view->setInspectorSetting(WebString::fromUTF8(it->first),
@@ -197,4 +215,6 @@ void WebPreferences::Apply(WebView* web_view) const {
settings->setInteractiveFormValidationEnabled(
interactive_form_validation_enabled);
+
+ settings->setFullScreenEnabled(fullscreen_enabled);
}
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index 468e9b4..0d37d39 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -70,13 +70,18 @@ struct WebPreferences {
bool experimental_webgl_enabled;
bool gl_multisampling_enabled;
bool show_composited_layer_borders;
+ bool show_composited_layer_tree;
+ bool show_fps_counter;
+ bool asynchronous_spell_checking_enabled;
bool accelerated_compositing_enabled;
+ bool composite_to_texture_enabled;
bool accelerated_layers_enabled;
bool accelerated_video_enabled;
bool accelerated_2d_canvas_enabled;
bool accelerated_plugins_enabled;
bool memory_info_enabled;
bool interactive_form_validation_enabled;
+ bool fullscreen_enabled;
// We try to keep the default values the same as the default values in
// chrome, except for the cases where it would require lots of extra work for
diff --git a/webkit/glue/webthemeengine_impl_linux.cc b/webkit/glue/webthemeengine_impl_linux.cc
index 6d9fc5b..6cdda79 100644
--- a/webkit/glue/webthemeengine_impl_linux.cc
+++ b/webkit/glue/webthemeengine_impl_linux.cc
@@ -105,6 +105,8 @@ static void GetNativeThemeExtraParams(
case WebKit::WebThemeEngine::PartButton:
native_theme_extra_params->button.is_default =
extra_params->button.isDefault;
+ native_theme_extra_params->button.has_border =
+ extra_params->button.hasBorder;
native_theme_extra_params->button.background_color =
extra_params->button.backgroundColor;
break;
@@ -117,6 +119,10 @@ static void GetNativeThemeExtraParams(
extra_params->textField.backgroundColor;
break;
case WebKit::WebThemeEngine::PartMenuList:
+ native_theme_extra_params->menu_list.has_border =
+ extra_params->menuList.hasBorder;
+ native_theme_extra_params->menu_list.has_border_radius =
+ extra_params->menuList.hasBorderRadius;
native_theme_extra_params->menu_list.arrow_x =
extra_params->menuList.arrowX;
native_theme_extra_params->menu_list.arrow_y =
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index d4b5162..b86e232 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -187,6 +187,9 @@ void PopulateURLResponse(
response->setWasAlternateProtocolAvailable(
info.was_alternate_protocol_available);
response->setWasFetchedViaProxy(info.was_fetched_via_proxy);
+ response->setRemoteIPAddress(
+ WebString::fromUTF8(info.socket_address.host()));
+ response->setRemotePort(info.socket_address.port());
response->setConnectionID(info.connection_id);
response->setConnectionReused(info.connection_reused);
response->setDownloadFilePath(FilePathToWebString(info.download_file_path));
@@ -289,8 +292,7 @@ class WebURLLoaderImpl::Context : public base::RefCounted<Context>,
const ResourceResponseInfo& info,
bool* has_new_first_party_for_cookies,
GURL* new_first_party_for_cookies);
- virtual void OnReceivedResponse(
- const ResourceResponseInfo& info, bool content_filtered);
+ virtual void OnReceivedResponse(const ResourceResponseInfo& info);
virtual void OnDownloadedData(int len);
virtual void OnReceivedData(const char* data, int len);
virtual void OnReceivedCachedMetadata(const char* data, int len);
@@ -531,15 +533,13 @@ bool WebURLLoaderImpl::Context::OnReceivedRedirect(
}
void WebURLLoaderImpl::Context::OnReceivedResponse(
- const ResourceResponseInfo& info,
- bool content_filtered) {
+ const ResourceResponseInfo& info) {
if (!client_)
return;
WebURLResponse response;
response.initialize();
PopulateURLResponse(request_.url(), info, &response);
- response.setIsContentFiltered(content_filtered);
bool show_raw_listing = (GURL(request_.url()).query() == "raw");
@@ -691,7 +691,7 @@ void WebURLLoaderImpl::Context::HandleDataURL() {
std::string data;
if (GetInfoFromDataURL(request_.url(), &info, &data, &status)) {
- OnReceivedResponse(info, false);
+ OnReceivedResponse(info);
if (!data.empty())
OnReceivedData(data.data(), data.size());
}