diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-02 17:10:59 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-02 17:10:59 +0000 |
commit | f103ab7a3af66f93aa6b674598ee8c977917f5f2 (patch) | |
tree | 670587d6caf0d0fc0a864f7b8d6e7b8da8f11f6d /webkit/glue/webplugin_impl_unittest.cc | |
parent | ee2bd0350faae7e862af993b8884d6c9c48559a4 (diff) | |
download | chromium_src-f103ab7a3af66f93aa6b674598ee8c977917f5f2.zip chromium_src-f103ab7a3af66f93aa6b674598ee8c977917f5f2.tar.gz chromium_src-f103ab7a3af66f93aa6b674598ee8c977917f5f2.tar.bz2 |
Eliminate remaining WebCore dependencies from webplugin_impl.cc
Introduces WebPluginPageDelegate to hold the methods that only
existed on WebViewDelegate to allow WebPluginImpl to talk to the
RenderView. This enables us to eliminate those methods from
WebViewDelegate, which eliminates the last dependency on gfx/
native_widget_types.h in our WebKit interface!
WebViewDelegate grows a CreatePlugin method that returns a
WebKit::WebPlugin. It loses its CreatePluginDelegate method,
which now lives on WebPluginPageDelegate.
This change makes RenderView use WeakPtr when it hands itself to
each WebPluginDelegateProxy and WebPluginImpl instance. This
makes the memory management simpler.
This change also moves various WebPlugin* interfaces defined in
webkit/glue into the webkit_glue namespace. This was to help
reduce confusion with similarly named types in the WebKit
namespace.
WebKit::WebPluginParams is added to contain the set of parameters
used to construct a plugin.
WebPluginContainer gets a couple more methods to allow us to avoid
WebCore dependencies in WebPluginImpl.
R=jam
BUG=10036
TEST=none
Review URL: http://codereview.chromium.org/181014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl_unittest.cc')
-rw-r--r-- | webkit/glue/webplugin_impl_unittest.cc | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/webkit/glue/webplugin_impl_unittest.cc b/webkit/glue/webplugin_impl_unittest.cc index b6c62f6..70c9436 100644 --- a/webkit/glue/webplugin_impl_unittest.cc +++ b/webkit/glue/webplugin_impl_unittest.cc @@ -1,23 +1,18 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 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 "config.h" - -// Avoid collisions with the LOG macro -#include <wtf/Assertions.h> -#undef LOG - #include "base/string_util.h" #include "testing/gtest/include/gtest/gtest.h" +#include "webkit/api/public/WebCString.h" #include "webkit/api/public/WebString.h" #include "webkit/api/public/WebURLRequest.h" -#include "webkit/glue/glue_util.h" #include "webkit/glue/webplugin_impl.h" using WebKit::WebHTTPBody; using WebKit::WebString; using WebKit::WebURLRequest; +using webkit_glue::WebPluginImpl; namespace { @@ -26,18 +21,10 @@ class WebPluginImplTest : public testing::Test { } -// These exist only to support the gTest assertion macros, and -// shouldn't be used in normal program code. -std::ostream& operator<<(std::ostream& out, const WebCore::String& str) -{ - return out << str.latin1().data(); -} - static std::string GetHeader(const WebURLRequest& request, const char* name) { std::string result; TrimWhitespace( - webkit_glue::WebStringToStdString( - request.httpHeaderField(WebString::fromUTF8(name))), + request.httpHeaderField(WebString::fromUTF8(name)).utf8(), TRIM_ALL, &result); return result; |