Skip to content

Commit

Permalink
FBTF: Remove all the easy headers from *_messages.h.
Browse files Browse the repository at this point in the history
BUG=51411
TEST=compiles

Review URL: http://codereview.chromium.org/3174002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55902 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
erg@google.com committed Aug 12, 2010
1 parent df24c66 commit 996e88a
Show file tree
Hide file tree
Showing 33 changed files with 1,200 additions and 916 deletions.
1 change: 1 addition & 0 deletions chrome/browser/extensions/extension_messages_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/values.h"
#include "chrome/browser/extensions/extension_message_service.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/extensions/event_bindings.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "app/app_switches.h"
#include "base/command_line.h"
#include "base/field_trial.h"
#include "base/histogram.h"
#include "base/logging.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/renderer_host/render_view_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@
#include "net/base/net_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/password_form_dom_manager.h"
#include "webkit/glue/webdropdata.h"

#if defined(OS_WIN)
// TODO(port): accessibility not yet implemented. See http://crbug.com/8288.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "app/x11_util.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/histogram.h"
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
#include "base/task.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/renderer_host/resource_dispatcher_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#include "net/base/net_errors.h"
#include "net/base/request_priority.h"
#include "net/base/ssl_cert_request_info.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "webkit/appcache/appcache_interceptor.h"
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/renderer_host/resource_message_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@
#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webcookie.h"
#include "webkit/glue/webkit_glue.h"

using WebKit::WebCache;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/renderer_host/sync_resource_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
// found in the LICENSE file.

#include "chrome/browser/renderer_host/sync_resource_handler.h"

#include "base/logging.h"
#include "chrome/common/render_messages.h"
#include "net/http/http_response_headers.h"

SyncResourceHandler::SyncResourceHandler(
ResourceDispatcherHost::Receiver* receiver,
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/visitedlink_event_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "base/shared_memory.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/common/render_messages.h"

using base::Time;
using base::TimeDelta;
Expand Down
39 changes: 39 additions & 0 deletions chrome/common/common_param_traits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,45 @@ void ParamTraits<Geoposition>::Log(const Geoposition& p, std::wstring* l) {
LogParam(p.error_code, l);
}

void ParamTraits<webkit_glue::PasswordForm>::Write(Message* m,
const param_type& p) {
WriteParam(m, p.signon_realm);
WriteParam(m, p.origin);
WriteParam(m, p.action);
WriteParam(m, p.submit_element);
WriteParam(m, p.username_element);
WriteParam(m, p.username_value);
WriteParam(m, p.password_element);
WriteParam(m, p.password_value);
WriteParam(m, p.old_password_element);
WriteParam(m, p.old_password_value);
WriteParam(m, p.ssl_valid);
WriteParam(m, p.preferred);
WriteParam(m, p.blacklisted_by_user);
}

bool ParamTraits<webkit_glue::PasswordForm>::Read(const Message* m, void** iter,
param_type* p) {
return
ReadParam(m, iter, &p->signon_realm) &&
ReadParam(m, iter, &p->origin) &&
ReadParam(m, iter, &p->action) &&
ReadParam(m, iter, &p->submit_element) &&
ReadParam(m, iter, &p->username_element) &&
ReadParam(m, iter, &p->username_value) &&
ReadParam(m, iter, &p->password_element) &&
ReadParam(m, iter, &p->password_value) &&
ReadParam(m, iter, &p->old_password_element) &&
ReadParam(m, iter, &p->old_password_value) &&
ReadParam(m, iter, &p->ssl_valid) &&
ReadParam(m, iter, &p->preferred) &&
ReadParam(m, iter, &p->blacklisted_by_user);
}
void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p,
std::wstring* l) {
l->append(L"<PasswordForm>");
}

void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) {
WriteParam(m, p.from);
WriteParam(m, p.to);
Expand Down
42 changes: 3 additions & 39 deletions chrome/common/common_param_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "net/base/upload_data.h"
#include "net/url_request/url_request_status.h"
#include "printing/native_metafile.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/window_open_disposition.h"

Expand Down Expand Up @@ -369,59 +368,24 @@ struct ParamTraits<Geoposition::ErrorCode> {
template <>
struct ParamTraits<webkit_glue::PasswordForm> {
typedef webkit_glue::PasswordForm param_type;
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.signon_realm);
WriteParam(m, p.origin);
WriteParam(m, p.action);
WriteParam(m, p.submit_element);
WriteParam(m, p.username_element);
WriteParam(m, p.username_value);
WriteParam(m, p.password_element);
WriteParam(m, p.password_value);
WriteParam(m, p.old_password_element);
WriteParam(m, p.old_password_value);
WriteParam(m, p.ssl_valid);
WriteParam(m, p.preferred);
WriteParam(m, p.blacklisted_by_user);
}
static bool Read(const Message* m, void** iter, param_type* p) {
return
ReadParam(m, iter, &p->signon_realm) &&
ReadParam(m, iter, &p->origin) &&
ReadParam(m, iter, &p->action) &&
ReadParam(m, iter, &p->submit_element) &&
ReadParam(m, iter, &p->username_element) &&
ReadParam(m, iter, &p->username_value) &&
ReadParam(m, iter, &p->password_element) &&
ReadParam(m, iter, &p->password_value) &&
ReadParam(m, iter, &p->old_password_element) &&
ReadParam(m, iter, &p->old_password_value) &&
ReadParam(m, iter, &p->ssl_valid) &&
ReadParam(m, iter, &p->preferred) &&
ReadParam(m, iter, &p->blacklisted_by_user);
}
static void Log(const param_type& p, std::wstring* l) {
l->append(L"<PasswordForm>");
}
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, void** iter, param_type* p);
static void Log(const param_type& p, std::wstring* l);
};

template <>
struct ParamTraits<printing::PageRange> {
typedef printing::PageRange param_type;
static void Write(Message* m, const param_type& p);

static bool Read(const Message* m, void** iter, param_type* r);

static void Log(const param_type& p, std::wstring* l);
};

template <>
struct ParamTraits<printing::NativeMetafile> {
typedef printing::NativeMetafile param_type;
static void Write(Message* m, const param_type& p);

static bool Read(const Message* m, void** iter, param_type* r);

static void Log(const param_type& p, std::wstring* l);
};

Expand Down
2 changes: 2 additions & 0 deletions chrome/common/plugin_messages.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "chrome/common/plugin_messages.h"

#include "ipc/ipc_channel_handle.h"

#define MESSAGES_INTERNAL_IMPL_FILE \
"chrome/common/plugin_messages_internal.h"
#include "ipc/ipc_message_impl_macros.h"
Loading

0 comments on commit 996e88a

Please sign in to comment.