Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Put classes in the IPC directory in the IPC namespace
https://bugs.webkit.org/show_bug.cgi?id=125665

Reviewed by Sam Weinig.

Also add a hack to config.h that lets us use CoreIPC and IPC interchangeably.

* Platform/IPC/DataReference.cpp:
* Platform/IPC/DataReference.h:
* Platform/IPC/MessageSender.cpp:
* Platform/IPC/MessageSender.h:
* Platform/IPC/StringReference.cpp:
* Platform/IPC/StringReference.h:
* config.h:

Canonical link: https://commits.webkit.org/143719@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Dec 13, 2013
1 parent 5d2a448 commit c030f05
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 19 deletions.
17 changes: 17 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,20 @@
2013-12-12 Anders Carlsson <andersca@apple.com>

Put classes in the IPC directory in the IPC namespace
https://bugs.webkit.org/show_bug.cgi?id=125665

Reviewed by Sam Weinig.

Also add a hack to config.h that lets us use CoreIPC and IPC interchangeably.

* Platform/IPC/DataReference.cpp:
* Platform/IPC/DataReference.h:
* Platform/IPC/MessageSender.cpp:
* Platform/IPC/MessageSender.h:
* Platform/IPC/StringReference.cpp:
* Platform/IPC/StringReference.h:
* config.h:

2013-12-13 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Add a unit tests to WebKit2 to test node names
Expand Down
6 changes: 2 additions & 4 deletions Source/WebKit2/Platform/IPC/DataReference.cpp
Expand Up @@ -29,7 +29,7 @@
#include "ArgumentDecoder.h"
#include "ArgumentEncoder.h"

namespace CoreIPC {
namespace IPC {

void DataReference::encode(ArgumentEncoder& encoder) const
{
Expand All @@ -41,6 +41,4 @@ bool DataReference::decode(ArgumentDecoder& decoder, DataReference& dataReferenc
return decoder.decodeVariableLengthByteArray(dataReference);
}

} // namespace CoreIPC


} // namespace IPC
4 changes: 2 additions & 2 deletions Source/WebKit2/Platform/IPC/DataReference.h
Expand Up @@ -28,7 +28,7 @@

#include <wtf/Vector.h>

namespace CoreIPC {
namespace IPC {

class ArgumentDecoder;
class ArgumentEncoder;
Expand Down Expand Up @@ -80,6 +80,6 @@ class DataReference {
size_t m_size;
};

} // namespace CoreIPC
} // namespace IPC

#endif // DataReference_h
4 changes: 2 additions & 2 deletions Source/WebKit2/Platform/IPC/MessageSender.cpp
Expand Up @@ -26,7 +26,7 @@
#include "config.h"
#include "MessageSender.h"

namespace CoreIPC {
namespace IPC {

MessageSender::~MessageSender()
{
Expand All @@ -39,4 +39,4 @@ bool MessageSender::sendMessage(std::unique_ptr<MessageEncoder> encoder, unsigne
return messageSenderConnection()->sendMessage(std::move(encoder), messageSendFlags);
}

} // namespace CoreIPC
} // namespace IPC
4 changes: 2 additions & 2 deletions Source/WebKit2/Platform/IPC/MessageSender.h
Expand Up @@ -29,7 +29,7 @@
#include <wtf/Assertions.h>
#include "Connection.h"

namespace CoreIPC {
namespace IPC {

class MessageSender {
public:
Expand Down Expand Up @@ -73,6 +73,6 @@ class MessageSender {
virtual uint64_t messageSenderDestinationID() = 0;
};

} // namespace CoreIPC
} // namespace IPC

#endif // MessageSender_h
4 changes: 2 additions & 2 deletions Source/WebKit2/Platform/IPC/StringReference.cpp
Expand Up @@ -32,7 +32,7 @@
#include <wtf/StringHasher.h>
#include <wtf/text/CString.h>

namespace CoreIPC {
namespace IPC {

CString StringReference::toString() const
{
Expand Down Expand Up @@ -61,4 +61,4 @@ unsigned StringReference::Hash::hash(const StringReference& a)
return StringHasher::computeHash(reinterpret_cast<const unsigned char*>(a.data()), a.size());
}

} // namespace CoreIPC
} // namespace IPC
14 changes: 7 additions & 7 deletions Source/WebKit2/Platform/IPC/StringReference.h
Expand Up @@ -30,7 +30,7 @@
#include <wtf/Forward.h>
#include <wtf/HashTraits.h>

namespace CoreIPC {
namespace IPC {

class ArgumentEncoder;
class ArgumentDecoder;
Expand Down Expand Up @@ -82,19 +82,19 @@ class StringReference {
size_t m_size;
};

} // namespace CoreIPC
} // namespace IPC

namespace WTF {
template<typename T> struct DefaultHash;

template<> struct DefaultHash<CoreIPC::StringReference> {
typedef CoreIPC::StringReference::Hash Hash;
template<> struct DefaultHash<IPC::StringReference> {
typedef IPC::StringReference::Hash Hash;
};

template<> struct HashTraits<CoreIPC::StringReference> : GenericHashTraits<CoreIPC::StringReference> {
template<> struct HashTraits<IPC::StringReference> : GenericHashTraits<IPC::StringReference> {
static const bool emptyValueIsZero = 0;
static void constructDeletedValue(CoreIPC::StringReference& stringReference) { stringReference = CoreIPC::StringReference(0, std::numeric_limits<size_t>::max()); }
static bool isDeletedValue(const CoreIPC::StringReference& stringReference) { return stringReference.size() == std::numeric_limits<size_t>::max(); }
static void constructDeletedValue(IPC::StringReference& stringReference) { stringReference = IPC::StringReference(0, std::numeric_limits<size_t>::max()); }
static bool isDeletedValue(const IPC::StringReference& stringReference) { return stringReference.size() == std::numeric_limits<size_t>::max(); }
};

} // namespace WTF
Expand Down
3 changes: 3 additions & 0 deletions Source/WebKit2/config.h
Expand Up @@ -88,3 +88,6 @@ static const type& name() \
#define ENABLE_SEC_ITEM_SHIM 1
#endif
#endif

// FIXME: Remove this once everything has been moved over to the IPC namespace.
#define CoreIPC IPC

0 comments on commit c030f05

Please sign in to comment.