summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/accessibility/browser_accessibility.h4
-rw-r--r--chrome/browser/accessibility/browser_accessibility_cocoa.mm8
-rw-r--r--chrome/browser/accessibility/browser_accessibility_mac_unittest.mm19
-rw-r--r--chrome/browser/accessibility/browser_accessibility_win.cc16
-rw-r--r--chrome/browser/autofill/autofill_browsertest.cc2
-rw-r--r--chrome/browser/background_contents_service.h2
-rw-r--r--chrome/browser/extensions/extension_messages_browsertest.cc1
-rw-r--r--chrome/browser/extensions/extension_webnavigation_api.cc2
-rw-r--r--chrome/browser/external_tab_container_win.cc3
-rw-r--r--chrome/browser/file_select_helper.cc11
-rw-r--r--chrome/browser/password_manager/password_manager.cc2
-rw-r--r--chrome/browser/prerender/prerender_contents.h2
-rw-r--r--chrome/browser/prerender/prerender_observer.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc2
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc3
-rw-r--r--chrome/browser/tab_contents/background_contents.cc1
-rw-r--r--chrome/browser/tab_contents/background_contents.h2
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.h2
-rw-r--r--chrome/browser/tabs/tab_finder.cc2
-rw-r--r--chrome/browser/translate/translate_manager_browsertest.cc1
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper.cc2
-rw-r--r--chrome/chrome_common.gypi2
-rw-r--r--chrome/common/common_param_traits.cc40
-rw-r--r--chrome/common/common_param_traits.h39
-rw-r--r--chrome/common/render_messages.cc154
-rw-r--r--chrome/common/render_messages.h468
-rw-r--r--chrome/common/render_messages_params.cc345
-rw-r--r--chrome/common/render_messages_params.h256
-rw-r--r--chrome/common/webkit_param_traits.cc63
-rw-r--r--chrome/common/webkit_param_traits.h23
-rw-r--r--chrome/renderer/chrome_content_renderer_client.cc3
-rw-r--r--chrome/renderer/render_process_impl.cc1
-rw-r--r--chrome/renderer/renderer_glue.cc1
-rw-r--r--content/browser/renderer_host/render_message_filter.cc6
-rw-r--r--content/browser/renderer_host/render_message_filter_gtk.cc1
-rw-r--r--content/browser/renderer_host/render_message_filter_win.cc2
-rw-r--r--content/browser/renderer_host/render_view_host.h2
-rw-r--r--content/browser/renderer_host/render_view_host_browsertest.cc2
-rw-r--r--content/browser/renderer_host/render_view_host_delegate.h2
-rw-r--r--content/browser/renderer_host/render_widget_helper.h2
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc3
-rw-r--r--content/browser/tab_contents/interstitial_page.cc2
-rw-r--r--content/browser/tab_contents/navigation_controller.cc2
-rw-r--r--content/browser/tab_contents/tab_contents_view.cc2
-rw-r--r--content/common/common_param_traits.cc40
-rw-r--r--content/common/common_param_traits.h14
-rw-r--r--content/common/view_messages.h821
-rw-r--r--content/common/window_container_type.cc (renamed from chrome/common/window_container_type.cc)2
-rw-r--r--content/common/window_container_type.h (renamed from chrome/common/window_container_type.h)6
-rw-r--r--content/content_common.gypi2
-rw-r--r--content/renderer/load_progress_tracker.cc2
-rw-r--r--content/renderer/render_view.cc12
-rw-r--r--content/renderer/render_widget_browsertest.cc3
-rw-r--r--content/renderer/render_widget_fullscreen.cc2
-rw-r--r--content/renderer/render_widget_fullscreen_pepper.cc2
-rw-r--r--content/renderer/renderer_webapplicationcachehost_impl.cc2
-rw-r--r--content/renderer/renderer_webcookiejar_impl.cc2
-rw-r--r--content/renderer/renderer_webkitclient_impl.cc1
-rw-r--r--content/renderer/web_ui_bindings.cc2
-rw-r--r--content/renderer/webplugin_delegate_proxy.cc1
-rw-r--r--webkit/glue/webaccessibility.cc1
-rw-r--r--webkit/glue/webaccessibility.h4
63 files changed, 903 insertions, 1528 deletions
diff --git a/chrome/browser/accessibility/browser_accessibility.h b/chrome/browser/accessibility/browser_accessibility.h
index e75b9cb..6f42911 100644
--- a/chrome/browser/accessibility/browser_accessibility.h
+++ b/chrome/browser/accessibility/browser_accessibility.h
@@ -143,7 +143,7 @@ class BrowserAccessibility {
return html_attributes_;
}
int32 index_in_parent() const { return index_in_parent_; }
- WebKit::WebRect location() const { return location_; }
+ gfx::Rect location() const { return location_; }
BrowserAccessibilityManager* manager() const { return manager_; }
const string16& name() const { return name_; }
int32 renderer_id() const { return renderer_id_; }
@@ -208,7 +208,7 @@ class BrowserAccessibility {
int32 role_;
int32 state_;
string16 role_name_;
- WebKit::WebRect location_;
+ gfx::Rect location_;
std::vector<int32> indirect_child_ids_;
// BrowserAccessibility objects are reference-counted on some platforms.
diff --git a/chrome/browser/accessibility/browser_accessibility_cocoa.mm b/chrome/browser/accessibility/browser_accessibility_cocoa.mm
index 411e4c4..0df73af 100644
--- a/chrome/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/chrome/browser/accessibility/browser_accessibility_cocoa.mm
@@ -127,8 +127,8 @@ bool GetState(BrowserAccessibility* accessibility, int state) {
// This is relative to webkit's top-left origin, not Cocoa's
// bottom-left origin.
- (NSPoint)origin {
- return NSMakePoint(browserAccessibility_->location().x,
- browserAccessibility_->location().y);
+ return NSMakePoint(browserAccessibility_->location().x(),
+ browserAccessibility_->location().y());
}
// Returns a string indicating the role of this object.
@@ -171,8 +171,8 @@ bool GetState(BrowserAccessibility* accessibility, int state) {
// Returns the size of this object.
- (NSSize)size {
- return NSMakeSize(browserAccessibility_->location().width,
- browserAccessibility_->location().height);
+ return NSMakeSize(browserAccessibility_->location().width(),
+ browserAccessibility_->location().height());
}
// Returns the accessibility value for the given attribute. If the value isn't
diff --git a/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm b/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm
index aea75d7..2b7cbba 100644
--- a/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm
+++ b/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm
@@ -47,26 +47,21 @@ class BrowserAccessibilityTest : public CocoaTest {
virtual void SetUp() {
CocoaTest::SetUp();
WebAccessibility root;
- root.location.x = 0;
- root.location.y = 0;
- root.location.width = 500;
- root.location.height = 100;
+ root.location.set_width(500);
+ root.location.set_height(100);
root.role = WebAccessibility::ROLE_WEB_AREA;
root.attributes[WebAccessibility::ATTR_HELP] = ASCIIToUTF16("HelpText");
WebAccessibility child1;
child1.name = ASCIIToUTF16("Child1");
- child1.location.x = 0;
- child1.location.y = 0;
- child1.location.width = 250;
- child1.location.height = 100;
+ child1.location.set_width(250);
+ child1.location.set_height(100);
child1.role = WebAccessibility::ROLE_BUTTON;
WebAccessibility child2;
- child2.location.x = 250;
- child2.location.y = 0;
- child2.location.width = 250;
- child2.location.height = 100;
+ child2.location.set_x(250);
+ child2.location.set_width(250);
+ child2.location.set_height(100);
child2.role = WebAccessibility::ROLE_HEADING;
root.children.push_back(child1);
diff --git a/chrome/browser/accessibility/browser_accessibility_win.cc b/chrome/browser/accessibility/browser_accessibility_win.cc
index 5b17979..5f38a03 100644
--- a/chrome/browser/accessibility/browser_accessibility_win.cc
+++ b/chrome/browser/accessibility/browser_accessibility_win.cc
@@ -509,14 +509,14 @@ STDMETHODIMP BrowserAccessibilityWin::get_imagePosition(
HWND parent_hwnd = manager_->GetParentView();
POINT top_left = {0, 0};
::ClientToScreen(parent_hwnd, &top_left);
- *x = location_.x + top_left.x;
- *y = location_.y + top_left.y;
+ *x = location_.x() + top_left.x;
+ *y = location_.y() + top_left.y;
} else if (coordinate_type == IA2_COORDTYPE_PARENT_RELATIVE) {
- *x = location_.x;
- *y = location_.y;
+ *x = location_.x();
+ *y = location_.y();
if (parent_) {
- *x -= parent_->location().x;
- *y -= parent_->location().y;
+ *x -= parent_->location().x();
+ *y -= parent_->location().y();
}
} else {
return E_INVALIDARG;
@@ -532,8 +532,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_imageSize(LONG* height, LONG* width) {
if (!height || !width)
return E_INVALIDARG;
- *height = location_.height;
- *width = location_.width;
+ *height = location_.height();
+ *width = location_.width();
return S_OK;
}
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 4c3e1f4..00177ad 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -20,13 +20,13 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/net/test_url_fetcher_factory.h"
-#include "chrome/common/render_messages.h"
#include "chrome/renderer/translate_helper.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "content/browser/renderer_host/mock_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/common/view_messages.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/keycodes/keyboard_codes.h"
diff --git a/chrome/browser/background_contents_service.h b/chrome/browser/background_contents_service.h
index ee29f07..1723ae7 100644
--- a/chrome/browser/background_contents_service.h
+++ b/chrome/browser/background_contents_service.h
@@ -11,9 +11,9 @@
#include "base/gtest_prod_util.h"
#include "chrome/browser/tab_contents/background_contents.h"
-#include "chrome/common/window_container_type.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
+#include "content/common/window_container_type.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/window_open_disposition.h"
diff --git a/chrome/browser/extensions/extension_messages_browsertest.cc b/chrome/browser/extensions/extension_messages_browsertest.cc
index bd36a80..30cfbd8 100644
--- a/chrome/browser/extensions/extension_messages_browsertest.cc
+++ b/chrome/browser/extensions/extension_messages_browsertest.cc
@@ -8,6 +8,7 @@
#include "chrome/renderer/extensions/event_bindings.h"
#include "chrome/renderer/extensions/renderer_extension_bindings.h"
#include "chrome/test/render_view_test.h"
+#include "content/common/view_messages.h"
#include "testing/gtest/include/gtest/gtest.h"
static void DispatchOnConnect(int source_port_id, const std::string& name,
diff --git a/chrome/browser/extensions/extension_webnavigation_api.cc b/chrome/browser/extensions/extension_webnavigation_api.cc
index 8d7873c..1eae3a6 100644
--- a/chrome/browser/extensions/extension_webnavigation_api.cc
+++ b/chrome/browser/extensions/extension_webnavigation_api.cc
@@ -14,12 +14,12 @@
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/extensions/extension_webnavigation_api_constants.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/render_messages_params.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/provisional_load_details.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_service.h"
+#include "content/common/view_messages.h"
#include "net/base/net_errors.h"
namespace keys = extension_webnavigation_api_constants;
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 0f9d064..a9412bd 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -32,8 +32,6 @@
#include "chrome/common/automation_messages.h"
#include "chrome/common/bindings_policy.h"
#include "chrome/common/chrome_constants.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -42,6 +40,7 @@
#include "content/common/native_web_keyboard_event.h"
#include "content/common/notification_service.h"
#include "content/common/page_transition_types.h"
+#include "content/common/view_messages.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
index 1a38437..c81ed2c 100644
--- a/chrome/browser/file_select_helper.cc
+++ b/chrome/browser/file_select_helper.cc
@@ -12,13 +12,12 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_details.h"
#include "content/common/notification_source.h"
+#include "content/common/view_messages.h"
#include "grit/generated_resources.h"
#include "net/base/mime_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -206,16 +205,16 @@ void FileSelectHelper::RunFileChooser(
select_file_dialog_ = SelectFileDialog::Create(this);
switch (params.mode) {
- case ViewHostMsg_RunFileChooser_Params::Open:
+ case ViewHostMsg_RunFileChooser_Mode::Open:
dialog_type_ = SelectFileDialog::SELECT_OPEN_FILE;
break;
- case ViewHostMsg_RunFileChooser_Params::OpenMultiple:
+ case ViewHostMsg_RunFileChooser_Mode::OpenMultiple:
dialog_type_ = SelectFileDialog::SELECT_OPEN_MULTI_FILE;
break;
- case ViewHostMsg_RunFileChooser_Params::OpenFolder:
+ case ViewHostMsg_RunFileChooser_Mode::OpenFolder:
dialog_type_ = SelectFileDialog::SELECT_FOLDER;
break;
- case ViewHostMsg_RunFileChooser_Params::Save:
+ case ViewHostMsg_RunFileChooser_Mode::Save:
dialog_type_ = SelectFileDialog::SELECT_SAVEAS_FILE;
break;
default:
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index f374e1c..6860b13 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/autofill_messages.h"
#include "chrome/common/pref_names.h"
-#include "chrome/common/render_messages_params.h"
+#include "content/common/view_messages.h"
#include "grit/generated_resources.h"
using webkit_glue::PasswordForm;
diff --git a/chrome/browser/prerender/prerender_contents.h b/chrome/browser/prerender/prerender_contents.h
index bec3df77..7f44a9a 100644
--- a/chrome/browser/prerender/prerender_contents.h
+++ b/chrome/browser/prerender/prerender_contents.h
@@ -14,9 +14,9 @@
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
#include "chrome/common/view_types.h"
-#include "chrome/common/window_container_type.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/common/notification_registrar.h"
+#include "content/common/window_container_type.h"
#include "webkit/glue/window_open_disposition.h"
class TabContents;
diff --git a/chrome/browser/prerender/prerender_observer.cc b/chrome/browser/prerender/prerender_observer.cc
index c218d0b..e536c3d 100644
--- a/chrome/browser/prerender/prerender_observer.cc
+++ b/chrome/browser/prerender/prerender_observer.cc
@@ -7,8 +7,8 @@
#include "base/time.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/render_messages.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/common/view_messages.h"
namespace prerender {
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index 1ec08bd..f3682e7 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -8,6 +8,7 @@
// errors happen because of a "#define Status int" in Xlib.h, which interacts
// badly with net::URLRequestStatus::Status.
#include "chrome/common/render_messages.h"
+#include "content/common/view_messages.h"
#include <cairo/cairo.h>
#include <gdk/gdk.h>
@@ -34,7 +35,6 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/common/native_web_keyboard_event.h"
-#include "content/common/view_messages.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/x/x11_util.h"
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 7129b3b..6d47bf4 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
#include "chrome/common/safebrowsing_messages.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
@@ -27,6 +26,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/notification_service.h"
#include "content/common/notification_type.h"
+#include "content/common/view_messages.h"
#include "googleurl/src/gurl.h"
namespace safe_browsing {
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index d767e55..c6858c7 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -8,12 +8,11 @@
#include "chrome/browser/safe_browsing/malware_details.h"
#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
#include "chrome/common/pref_names.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/common/view_messages.h"
static const char* kGoogleURL = "http://www.google.com/";
static const char* kGoodURL = "http://www.goodguys.com/";
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index e9ea273..8c92a0e 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -16,6 +16,7 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
#include "content/common/notification_service.h"
+#include "content/common/view_messages.h"
#include "ui/gfx/rect.h"
////////////////
diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h
index 0cbcd36..70659c7 100644
--- a/chrome/browser/tab_contents/background_contents.h
+++ b/chrome/browser/tab_contents/background_contents.h
@@ -12,9 +12,9 @@
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
#include "chrome/common/view_types.h"
-#include "chrome/common/window_container_type.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/common/notification_registrar.h"
+#include "content/common/window_container_type.h"
#include "webkit/glue/window_open_disposition.h"
class TabContents;
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
index 1367f9f..4af68c8 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h
@@ -9,8 +9,8 @@
#include <map>
#include "base/basictypes.h"
-#include "chrome/common/window_container_type.h"
#include "content/browser/webui/web_ui_factory.h"
+#include "content/common/window_container_type.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/webpreferences.h"
diff --git a/chrome/browser/tabs/tab_finder.cc b/chrome/browser/tabs/tab_finder.cc
index 6826316..9152564 100644
--- a/chrome/browser/tabs/tab_finder.cc
+++ b/chrome/browser/tabs/tab_finder.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/render_messages_params.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
@@ -19,6 +18,7 @@
#include "content/common/notification_source.h"
#include "content/common/notification_type.h"
#include "content/common/page_transition_types.h"
+#include "content/common/view_messages.h"
class TabFinder::TabContentsObserverImpl : public TabContentsObserver {
public:
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc
index 48ec8da..5f1a40e 100644
--- a/chrome/browser/translate/translate_manager_browsertest.cc
+++ b/chrome/browser/translate/translate_manager_browsertest.cc
@@ -27,6 +27,7 @@
#include "content/common/notification_observer_mock.h"
#include "content/common/notification_registrar.h"
#include "content/common/notification_type.h"
+#include "content/common/view_messages.h"
#include "grit/generated_resources.h"
#include "ipc/ipc_test_sink.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
index e23d793..670a36f 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h"
#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
+#include "content/common/view_messages.h"
#include "content/browser/tab_contents/tab_contents.h"
namespace {
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi
index 4e7dd6b..f735954 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -243,8 +243,6 @@
'common/web_resource/web_resource_unpacker.h',
'common/webkit_param_traits.cc',
'common/webkit_param_traits.h',
- 'common/window_container_type.cc',
- 'common/window_container_type.h',
'common/worker_thread_ticker.cc',
'common/worker_thread_ticker.h',
'common/zip.cc', # Requires zlib directly.
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index a20d987..415ff73 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -14,7 +14,6 @@
#include "printing/backend/print_backend.h"
#include "printing/native_metafile.h"
#include "printing/page_range.h"
-#include "webkit/glue/password_form.h"
namespace IPC {
@@ -149,45 +148,6 @@ void ParamTraits<ThumbnailScore>::Log(const param_type& p, std::string* l) {
p.boring_score, p.good_clipping, p.at_top));
}
-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::string* l) {
- l->append("<PasswordForm>");
-}
-
void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) {
WriteParam(m, p.from);
WriteParam(m, p.to);
diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h
index 73207ec..1468a52 100644
--- a/chrome/common/common_param_traits.h
+++ b/chrome/common/common_param_traits.h
@@ -17,15 +17,6 @@
#include "chrome/common/content_settings.h"
#include "ipc/ipc_message_utils.h"
#include "printing/native_metafile.h"
-// !!! WARNING: DO NOT ADD NEW WEBKIT DEPENDENCIES !!!
-//
-// That means don't add #includes to any file in 'webkit/' or
-// 'third_party/WebKit/'. Chrome Frame and NACL build parts of base/ and
-// chrome/common/ for a mini-library that doesn't depend on webkit.
-//
-// TODO(erg): The following headers are historical and only work because
-// their definitions are inlined, which also needs to be fixed.
-#include "webkit/glue/window_open_disposition.h"
// Forward declarations.
class DictionaryValue;
@@ -38,10 +29,6 @@ struct PageRange;
struct PrinterCapsAndDefaults;
} // namespace printing
-namespace webkit_glue {
-struct PasswordForm;
-} // namespace webkit_glue
-
namespace IPC {
template <>
@@ -81,24 +68,6 @@ struct ParamTraits<ContentSettings> {
};
template <>
-struct ParamTraits<WindowOpenDisposition> {
- typedef WindowOpenDisposition param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, static_cast<int>(p));
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- int value;
- if (!ReadParam(m, iter, &value))
- return false;
- *r = static_cast<param_type>(value);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- LogParam(static_cast<int>(p), l);
- }
-};
-
-template <>
struct ParamTraits<WebApplicationInfo> {
typedef WebApplicationInfo param_type;
static void Write(Message* m, const param_type& p);
@@ -115,14 +84,6 @@ struct ParamTraits<ThumbnailScore> {
};
template <>
-struct ParamTraits<webkit_glue::PasswordForm> {
- typedef webkit_glue::PasswordForm param_type;
- 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::string* l);
-};
-
-template <>
struct ParamTraits<printing::PageRange> {
typedef printing::PageRange param_type;
static void Write(Message* m, const param_type& p);
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
index bf77ae0..8076ea8 100644
--- a/chrome/common/render_messages.cc
+++ b/chrome/common/render_messages.cc
@@ -35,130 +35,6 @@ namespace IPC {
namespace IPC {
-#if defined(OS_MACOSX)
-void ParamTraits<FontDescriptor>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.font_name);
- WriteParam(m, p.font_point_size);
-}
-
-bool ParamTraits<FontDescriptor>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->font_name) &&
- ReadParam(m, iter, &p->font_point_size);
-}
-
-void ParamTraits<FontDescriptor>::Log(const param_type& p, std::string* l) {
- l->append("<FontDescriptor>");
-}
-#endif
-
-void ParamTraits<webkit::npapi::WebPluginGeometry>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.window);
- WriteParam(m, p.window_rect);
- WriteParam(m, p.clip_rect);
- WriteParam(m, p.cutout_rects);
- WriteParam(m, p.rects_valid);
- WriteParam(m, p.visible);
-}
-
-bool ParamTraits<webkit::npapi::WebPluginGeometry>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->window) &&
- ReadParam(m, iter, &p->window_rect) &&
- ReadParam(m, iter, &p->clip_rect) &&
- ReadParam(m, iter, &p->cutout_rects) &&
- ReadParam(m, iter, &p->rects_valid) &&
- ReadParam(m, iter, &p->visible);
-}
-
-void ParamTraits<webkit::npapi::WebPluginGeometry>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.window, l);
- l->append(", ");
- LogParam(p.window_rect, l);
- l->append(", ");
- LogParam(p.clip_rect, l);
- l->append(", ");
- LogParam(p.cutout_rects, l);
- l->append(", ");
- LogParam(p.rects_valid, l);
- l->append(", ");
- LogParam(p.visible, l);
- l->append(")");
-}
-
-void ParamTraits<webkit::npapi::WebPluginMimeType>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.mime_type);
- WriteParam(m, p.file_extensions);
- WriteParam(m, p.description);
-}
-
-bool ParamTraits<webkit::npapi::WebPluginMimeType>::Read(const Message* m,
- void** iter,
- param_type* r) {
- return
- ReadParam(m, iter, &r->mime_type) &&
- ReadParam(m, iter, &r->file_extensions) &&
- ReadParam(m, iter, &r->description);
-}
-
-void ParamTraits<webkit::npapi::WebPluginMimeType>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.mime_type, l);
- l->append(", ");
- LogParam(p.file_extensions, l);
- l->append(", ");
- LogParam(p.description, l);
- l->append(")");
-}
-
-void ParamTraits<webkit::npapi::WebPluginInfo>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.path);
- WriteParam(m, p.version);
- WriteParam(m, p.desc);
- WriteParam(m, p.mime_types);
- WriteParam(m, p.enabled);
-}
-
-bool ParamTraits<webkit::npapi::WebPluginInfo>::Read(const Message* m,
- void** iter,
- param_type* r) {
- return
- ReadParam(m, iter, &r->name) &&
- ReadParam(m, iter, &r->path) &&
- ReadParam(m, iter, &r->version) &&
- ReadParam(m, iter, &r->desc) &&
- ReadParam(m, iter, &r->mime_types) &&
- ReadParam(m, iter, &r->enabled);
-}
-
-void ParamTraits<webkit::npapi::WebPluginInfo>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.name, l);
- l->append(", ");
- l->append(", ");
- LogParam(p.path, l);
- l->append(", ");
- LogParam(p.version, l);
- l->append(", ");
- LogParam(p.desc, l);
- l->append(", ");
- LogParam(p.mime_types, l);
- l->append(", ");
- LogParam(p.enabled, l);
- l->append(")");
-}
-
void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) {
WriteParam(m, p.valid_schemes());
WriteParam(m, p.GetAsString());
@@ -180,36 +56,6 @@ void ParamTraits<URLPattern>::Log(const param_type& p, std::string* l) {
LogParam(p.GetAsString(), l);
}
-void ParamTraits<webkit_glue::WebCookie>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.value);
- WriteParam(m, p.domain);
- WriteParam(m, p.path);
- WriteParam(m, p.expires);
- WriteParam(m, p.http_only);
- WriteParam(m, p.secure);
- WriteParam(m, p.session);
-}
-
-bool ParamTraits<webkit_glue::WebCookie>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->name) &&
- ReadParam(m, iter, &p->value) &&
- ReadParam(m, iter, &p->domain) &&
- ReadParam(m, iter, &p->path) &&
- ReadParam(m, iter, &p->expires) &&
- ReadParam(m, iter, &p->http_only) &&
- ReadParam(m, iter, &p->secure) &&
- ReadParam(m, iter, &p->session);
-}
-
-void ParamTraits<webkit_glue::WebCookie>::Log(const param_type& p,
- std::string* l) {
- l->append("<WebCookie>");
-}
-
void ParamTraits<ExtensionExtent>::Write(Message* m, const param_type& p) {
WriteParam(m, p.patterns());
}
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index d552ad4..924b7cf 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -34,7 +34,6 @@
#include "chrome/common/view_types.h"
#include "chrome/common/web_apps.h"
#include "chrome/common/webkit_param_traits.h"
-#include "chrome/common/window_container_type.h"
#include "content/common/common_param_traits.h"
#include "content/common/css_colors.h"
#include "content/common/notification_type.h"
@@ -47,23 +46,15 @@
#include "ipc/ipc_platform_file.h" // ifdefed typedef.
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/webaccessibility.h"
-#include "webkit/glue/webcookie.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/plugins/npapi/webplugin.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
#endif
-#if defined(OS_MACOSX)
-#include "content/common/font_descriptor_mac.h"
-#endif
-
// TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes
// more sense with our current design.
@@ -99,42 +90,6 @@ enum ViewHostMsg_JavaScriptStressTestControl_Commands {
namespace IPC {
-#if defined(OS_MACOSX)
-// Traits for FontDescriptor structure to pack/unpack.
-template <>
-struct ParamTraits<FontDescriptor> {
- typedef FontDescriptor param_type;
- 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::string* l);
-};
-#endif
-
-template <>
-struct ParamTraits<webkit::npapi::WebPluginGeometry> {
- typedef webkit::npapi::WebPluginGeometry param_type;
- 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::string* l);
-};
-
-// Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack.
-template <>
-struct ParamTraits<webkit::npapi::WebPluginMimeType> {
- typedef webkit::npapi::WebPluginMimeType 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::string* l);
-};
-
-template <>
-struct ParamTraits<webkit::npapi::WebPluginInfo> {
- typedef webkit::npapi::WebPluginInfo 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::string* l);
-};
-
#if defined(OS_POSIX)
// TODO(port): this shouldn't exist. However, the plugin stuff is really using
@@ -174,15 +129,6 @@ struct ParamTraits<URLPattern> {
static void Log(const param_type& p, std::string* l);
};
-// Traits for WebCookie
-template <>
-struct ParamTraits<webkit_glue::WebCookie> {
- typedef webkit_glue::WebCookie param_type;
- 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::string* l);
-};
-
template <>
struct SimilarTypeTraits<TranslateErrors::Type> {
typedef int Type;
@@ -559,283 +505,9 @@ IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL)
// TabContents messages
// These are messages sent from the renderer to the browser process.
-// Sent by the renderer when it is creating a new window. The browser creates
-// a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
-// MSG_ROUTING_NONE, the view couldn't be created.
-IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateWindow,
- ViewHostMsg_CreateWindow_Params,
- int /* route_id */,
- int64 /* cloned_session_storage_namespace_id */)
-
-// Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
-// <select> dropdowns. This message is sent to the TabContents that
-// contains the widget being created.
-IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWidget,
- int /* opener_id */,
- WebKit::WebPopupType /* popup type */,
- int /* route_id */)
-
-// Similar to ViewHostMsg_CreateWidget except the widget is a full screen
-// window.
-IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateFullscreenWidget,
- int /* opener_id */,
- int /* route_id */)
-
-// These three messages are sent to the parent RenderViewHost to display the
-// page/widget that was created by
-// CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
-// refers to the id that was returned from the Create message above.
-// The initial_position parameter is a rectangle in screen coordinates.
-//
-// FUTURE: there will probably be flags here to control if the result is
-// in a new window.
-IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
- int /* route_id */,
- WindowOpenDisposition /* disposition */,
- gfx::Rect /* initial_pos */,
- bool /* opened_by_user_gesture */)
-
-IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
- int /* route_id */,
- gfx::Rect /* initial_pos */)
-
-// Message to show a full screen widget.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
- int /* route_id */)
-
-// This message is sent after ViewHostMsg_ShowView to cause the RenderView
-// to run in a modal fashion until it is closed.
-IPC_SYNC_MESSAGE_ROUTED0_0(ViewHostMsg_RunModal)
-
IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
WebKit::WebCache::UsageStats /* stats */)
-// Indicates the renderer is ready in response to a ViewMsg_New or
-// a ViewMsg_CreatingNew_ACK.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
-
-
-// Indicates the renderer process is gone. This actually is sent by the
-// browser process to itself, but keeps the interface cleaner.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderViewGone,
- int, /* this really is base::TerminationStatus */
- int /* exit_code */)
-
-// Sent by the renderer process to request that the browser close the view.
-// This corresponds to the window.close() API, and the browser may ignore
-// this message. Otherwise, the browser will generates a ViewMsg_Close
-// message to close the view.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
-
-// Sent by the renderer process to request that the browser move the view.
-// This corresponds to the window.resizeTo() and window.moveTo() APIs, and
-// the browser may ignore this message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
- gfx::Rect /* position */)
-
-// Notifies the browser that a frame in the view has changed. This message
-// has a lot of parameters and is packed/unpacked by functions defined in
-// render_messages.h.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate,
- ViewHostMsg_FrameNavigate_Params)
-
-// Notifies the browser that we have session history information.
-// page_id: unique ID that allows us to distinguish between history entries.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
- int32 /* page_id */,
- std::string /* state */)
-
-// Notifies the browser that a document has been loaded in a frame.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame,
- int64 /* frame_id */)
-
-// Notifies the browser that a frame finished loading.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFinishLoad,
- int64 /* frame_id */)
-
-// Changes the title for the page in the UI when the page is navigated or the
-// title changes.
-// TODO(darin): use a UTF-8 string to reduce data size
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTitle, int32, std::wstring)
-
-// Changes the icon url for the page in the UI.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateIconURL, int32, GURL)
-
-// Change the encoding name of the page in UI when the page has detected
-// proper encoding name.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
- std::string /* new encoding name */)
-
-// Notifies the browser that we want to show a destination url for a potential
-// action (e.g. when the user is hovering over a link).
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL, int32, GURL)
-
-// Sent when the renderer starts loading the page. This corresponds to
-// WebKit's notion of the throbber starting. Note that sometimes you may get
-// duplicates of these during a single load.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading)
-
-// Sent when the renderer is done loading a page. This corresponds to WebKit's
-// notion of the throbber stopping.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading)
-
-// Sent when the renderer main frame has made progress loading.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
- double /* load_progress */)
-
-// Sent when the document element is available for the toplevel frame. This
-// happens after the page starts loading, but before all resources are
-// finished.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
-
-// Sent when after the onload handler has been invoked for the document
-// in the toplevel frame.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
- int32 /* page_id */)
-
-// Sent when the renderer loads a resource from its memory cache.
-// The security info is non empty if the resource was originally loaded over
-// a secure connection.
-// Note: May only be sent once per URL per frame per committed load.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DidLoadResourceFromMemoryCache,
- GURL /* url */,
- std::string /* security info */)
-
-// Sent when the renderer displays insecure content in a secure page.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
-
-// Sent when the renderer runs insecure content in a secure origin.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
- std::string /* security_origin */,
- GURL /* target URL */)
-
-// Sent when the renderer starts a provisional load for a frame.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_DidStartProvisionalLoadForFrame,
- int64 /* frame_id */,
- bool /* true if it is the main frame */,
- GURL /* url */)
-
-// Sent when the renderer fails a provisional load with an error.
-IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailProvisionalLoadWithError,
- int64 /* frame_id */,
- bool /* true if it is the main frame */,
- int /* error_code */,
- GURL /* url */,
- bool /* true if the failure is the result of
- navigating to a POST again and we're going to
- show the POST interstitial */)
-
-// Tells the render view that a ViewHostMsg_PaintAtSize message was
-// processed, and the DIB is ready for use. |tag| has the same value that
-// the tag sent along with ViewMsg_PaintAtSize.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK,
- int /* tag */,
- gfx::Size /* size */)
-
-// Sent to update part of the view. In response to this message, the host
-// generates a ViewMsg_UpdateRect_ACK message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
- ViewHostMsg_UpdateRect_Params)
-
-// Sent by the renderer when accelerated compositing is enabled or disabled to
-// notify the browser whether or not is should do painting.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
- bool /* true if the accelerated compositor is actve */)
-
-// Acknowledges receipt of a ViewMsg_HandleInputEvent message.
-// Payload is a WebInputEvent::Type which is the type of the event, followed
-// by an optional WebInputEvent which is provided only if the event was not
-// processed.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_HandleInputEvent_ACK)
-
-IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
-IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
-
-// Message sent from renderer to the browser when focus changes inside the
-// webpage. The parameter says whether the newly focused element needs
-// keyboard input (true for textfields, text areas and content editable divs).
-IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
- bool /* is_editable_node */)
-
-// Returns the window location of the given window.
-// TODO(shess): Provide a mapping from reply_msg->routing_id() to
-// HWND so that we can eliminate the NativeViewId parameter.
-IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetWindowRect,
- gfx::NativeViewId /* window */,
- gfx::Rect /* Out: Window location */)
-
-IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, WebCursor)
-
-// Used to set a cookie. The cookie is set asynchronously, but will be
-// available to a subsequent ViewHostMsg_GetCookies request.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- std::string /* cookie */)
-
-// Used to get cookies for the given URL. This may block waiting for a
-// previous SetCookie message to be processed.
-IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- std::string /* cookies */)
-
-// Used to get raw cookie information for the given URL. This may block
-// waiting for a previous SetCookie message to be processed.
-IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetRawCookies,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- std::vector<webkit_glue::WebCookie>
- /* raw_cookies */)
-
-// Used to delete cookie for the given URL and name
-IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
- GURL /* url */,
- std::string /* cookie_name */)
-
-// Used to check if cookies are enabled for the given URL. This may block
-// waiting for a previous SetCookie message to be processed.
-IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_CookiesEnabled,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- bool /* cookies_enabled */)
-
-// Used to get the list of plugins
-IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
- bool /* refresh*/,
- std::vector<webkit::npapi::WebPluginInfo> /* plugins */)
-
-// Return information about a plugin for the given URL and MIME
-// type. If there is no matching plugin, |found| is false. If
-// |enabled| in the WebPluginInfo struct is false, the plug-in is
-// treated as if it was not installed at all.
-//
-// If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is
-// blocked by the content settings for |policy_url|. It still
-// appears in navigator.plugins in Javascript though, and can be
-// loaded via click-to-play.
-//
-// If |setting| is set to CONTENT_SETTING_ALLOW, the domain is
-// explicitly white-listed for the plug-in, or the user has chosen
-// not to block nonsandboxed plugins.
-//
-// If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
-// neither blocked nor white-listed, which means that it's allowed
-// by default and can still be blocked if it's non-sandboxed.
-//
-// |actual_mime_type| is the actual mime type supported by the
-// plugin found that match the URL given (one for each item in
-// |info|).
-IPC_SYNC_MESSAGE_CONTROL4_4(ViewHostMsg_GetPluginInfo,
- int /* routing_id */,
- GURL /* url */,
- GURL /* policy_url */,
- std::string /* mime_type */,
- bool /* found */,
- webkit::npapi::WebPluginInfo /* plugin info */,
- ContentSetting /* setting */,
- std::string /* actual_mime_type */)
-
// Requests spellcheck for a word.
IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_SpellCheck,
string16 /* word to check */,
@@ -847,7 +519,6 @@ IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_SpellCheck,
IPC_SYNC_MESSAGE_ROUTED0_1(ViewHostMsg_GetDocumentTag,
int /* the tag */)
-
// This message tells the spellchecker that a document, identified by an int
// tag, has been closed and all of the ignored words for that document can be
// forgotten.
@@ -868,47 +539,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
ContentSettingsType, /* type of blocked content */
std::string /* resource identifier */)
-// Tells the browser that a specific Appcache manifest in the current page
-// was accessed.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
- GURL /* manifest url */,
- bool /* blocked by policy */)
-
-// Tells the browser that a specific Web database in the current page was
-// accessed.
-IPC_MESSAGE_ROUTED5(ViewHostMsg_WebDatabaseAccessed,
- GURL /* origin url */,
- string16 /* database name */,
- string16 /* database display name */,
- unsigned long /* estimated size */,
- bool /* blocked by policy */)
-
-// Initiates a download based on user actions like 'ALT+click'.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DownloadUrl,
- GURL /* url */,
- GURL /* referrer */)
-
-// Used to go to the session history entry at the given offset (ie, -1 will
-// return the "back" item).
-IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
- int /* offset (from current) of history item to get */)
-
-IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
- std::wstring /* in - alert message */,
- std::wstring /* in - default prompt */,
- GURL /* in - originating page URL */,
- int /* in - dialog flags */,
- bool /* out - success */,
- std::wstring /* out - prompt field */)
-
-// Provides the contents for the given page that was loaded recently.
-IPC_MESSAGE_ROUTED5(ViewHostMsg_PageContents,
- GURL /* URL of the page */,
- int32 /* page id */,
- string16 /* page contents */,
- std::string /* page ISO639_1 language code */,
- bool /* whether the page can be translated */)
-
// Used to get the extension message bundle.
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetExtensionMessageBundle,
std::string /* extension id */,
@@ -930,16 +560,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL,
int32 /* page_id */,
GURL /* url of the favicon */)
-// Requests that the given URL be opened in the specified manner.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_OpenURL,
- GURL /* url */,
- GURL /* referrer */,
- WindowOpenDisposition /* disposition */)
-
-// Notifies that the preferred size of the content changed.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
- gfx::Size /* pref_size */)
-
// Following message is used to communicate the values received by the
// callback binding the JS to Cpp.
// An instance of browser that has an automation host listening to it can
@@ -949,39 +569,12 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
std::string /* json_string */,
int /* automation_id */)
-// A message from HTML-based UI. When (trusted) Javascript calls
-// send(message, args), this message is sent to the browser.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
- GURL /* source_url */,
- std::string /* message */,
- std::string /* args (as a JSON string) */)
-
// A message for an external host.
IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
std::string /* message */,
std::string /* origin */,
std::string /* target */)
-// A renderer sends this to the browser process when it wants to
-// create a plugin. The browser will create the plugin process if
-// necessary, and will return a handle to the channel on success.
-// On error an empty string is returned.
-IPC_SYNC_MESSAGE_CONTROL3_2(ViewHostMsg_OpenChannelToPlugin,
- int /* routing_id */,
- GURL /* url */,
- std::string /* mime_type */,
- IPC::ChannelHandle /* channel_handle */,
- webkit::npapi::WebPluginInfo /* info */)
-
-// A renderer sends this to the browser process when it wants to
-// create a pepper plugin. The browser will create the plugin process if
-// necessary, and will return a handle to the channel on success.
-// On error an empty string is returned.
-IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_OpenChannelToPepperPlugin,
- FilePath /* path */,
- base::ProcessHandle /* plugin_process_handle */,
- IPC::ChannelHandle /* handle to channel */)
-
// A renderer sends this to the browser process when it wants to start
// a new instance of the Native Client process. The browser will launch
// the process and return a handle to an IMC channel.
@@ -993,60 +586,6 @@ IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl,
base::ProcessHandle /* NaCl process handle */,
base::ProcessId /* NaCl process id */)
-#if defined(USE_X11)
-// A renderer sends this when it needs a browser-side widget for
-// hosting a windowed plugin. id is the XID of the plugin window, for which
-// the container is created.
-IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer,
- gfx::PluginWindowHandle /* id */)
-
-// Destroy a plugin container previously created using CreatePluginContainer.
-// id is the XID of the plugin window corresponding to the container that is
-// to be destroyed.
-IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer,
- gfx::PluginWindowHandle /* id */)
-#endif
-
-#if defined(OS_MACOSX)
-// Request that the browser load a font into shared memory for us.
-IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_LoadFont,
- FontDescriptor /* font to load */,
- uint32 /* buffer size */,
- base::SharedMemoryHandle /* font data */)
-#endif
-
-#if defined(OS_WIN)
-// Request that the given font be loaded by the browser so it's cached by the
-// OS. Please see ChildProcessHost::PreCacheFont for details.
-IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_PreCacheFont,
- LOGFONT /* font data */)
-#endif // defined(OS_WIN)
-
-// Returns WebScreenInfo corresponding to the view.
-// TODO(shess): Provide a mapping from reply_msg->routing_id() to
-// HWND so that we can eliminate the NativeViewId parameter.
-IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetScreenInfo,
- gfx::NativeViewId /* view */,
- WebKit::WebScreenInfo /* results */)
-
-// Send the tooltip text for the current mouse position to the browser.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
- std::wstring /* tooltip text string */,
- WebKit::WebTextDirection /* text direction hint */)
-
-// Notification that the text selection has changed.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionChanged,
- std::string /* currently selected text */)
-
-// Asks the browser to display the file chooser. The result is returned in a
-// ViewHost_RunFileChooserResponse message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
- ViewHostMsg_RunFileChooser_Params)
-
-// Tells the browser to move the focus to the next (previous if reverse is
-// true) focusable element.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, bool /* reverse */)
-
// Notification that the page has an OpenSearch description document
// associated with it.
IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD,
@@ -1281,13 +820,6 @@ IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
bool /* enabled */)
-// Returns the window location of the window this widget is embeded.
-// TODO(shess): Provide a mapping from reply_msg->routing_id() to
-// HWND so that we can eliminate the NativeViewId parameter.
-IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect,
- gfx::NativeViewId /* window */,
- gfx::Rect /* Out: Window location */)
-
// A renderer sends this message when an extension process starts an API
// request. The browser will always respond with a ViewMsg_ExtensionResponse.
IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest,
diff --git a/chrome/common/render_messages_params.cc b/chrome/common/render_messages_params.cc
index 4a60180..eb5d8a0 100644
--- a/chrome/common/render_messages_params.cc
+++ b/chrome/common/render_messages_params.cc
@@ -9,32 +9,6 @@
#include "chrome/common/render_messages.h"
#include "net/base/upload_data.h"
-ViewHostMsg_FrameNavigate_Params::ViewHostMsg_FrameNavigate_Params()
- : page_id(0),
- frame_id(0),
- transition(PageTransition::TYPED),
- should_update_history(false),
- gesture(NavigationGestureUser),
- is_post(false),
- was_within_same_page(false),
- http_status_code(0),
- was_fetched_via_proxy(false) {
-}
-
-ViewHostMsg_FrameNavigate_Params::~ViewHostMsg_FrameNavigate_Params() {
-}
-
-ViewHostMsg_UpdateRect_Params::ViewHostMsg_UpdateRect_Params()
- : dx(0),
- dy(0),
- flags(0) {
- // On windows, bitmap is of type "struct HandleAndSequenceNum"
- memset(&bitmap, 0, sizeof(bitmap));
-}
-
-ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() {
-}
-
ViewMsg_Print_Params::ViewMsg_Print_Params()
: margin_top(0),
margin_left(0),
@@ -147,24 +121,6 @@ ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params(
ViewMsg_ExecuteCode_Params::~ViewMsg_ExecuteCode_Params() {
}
-ViewHostMsg_CreateWindow_Params::ViewHostMsg_CreateWindow_Params()
- : opener_id(0),
- user_gesture(false),
- window_container_type(WINDOW_CONTAINER_TYPE_NORMAL),
- session_storage_namespace_id(0),
- opener_frame_id(0) {
-}
-
-ViewHostMsg_CreateWindow_Params::~ViewHostMsg_CreateWindow_Params() {
-}
-
-ViewHostMsg_RunFileChooser_Params::ViewHostMsg_RunFileChooser_Params()
- : mode(Open) {
-}
-
-ViewHostMsg_RunFileChooser_Params::~ViewHostMsg_RunFileChooser_Params() {
-}
-
ViewHostMsg_DomMessage_Params::ViewHostMsg_DomMessage_Params()
: request_id(0),
has_callback(false),
@@ -247,57 +203,6 @@ scoped_refptr<Extension>
namespace IPC {
-template<>
-struct ParamTraits<NavigationGesture> {
- typedef NavigationGesture param_type;
- static void Write(Message* m, const param_type& p) {
- m->WriteInt(p);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- int type;
- if (!m->ReadInt(iter, &type))
- return false;
- *p = static_cast<NavigationGesture>(type);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- std::string event;
- switch (p) {
- case NavigationGestureUser:
- event = "GESTURE_USER";
- break;
- case NavigationGestureAuto:
- event = "GESTURE_AUTO";
- break;
- default:
- event = "GESTURE_UNKNOWN";
- break;
- }
- LogParam(event, l);
- }
-};
-
-template <>
-struct ParamTraits<WindowContainerType> {
- typedef WindowContainerType param_type;
- static void Write(Message* m, const param_type& p) {
- int val = static_cast<int>(p);
- WriteParam(m, val);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- int val = 0;
- if (!ReadParam(m, iter, &val) ||
- val < WINDOW_CONTAINER_TYPE_NORMAL ||
- val >= WINDOW_CONTAINER_TYPE_MAX_VALUE)
- return false;
- *p = static_cast<param_type>(val);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- ParamTraits<int>::Log(static_cast<int>(p), l);
- }
-};
-
template <>
struct ParamTraits<Extension::Location> {
typedef Extension::Location param_type;
@@ -420,151 +325,6 @@ void ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params>::Log(
LogParam(state, l);
}
-void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.page_id);
- WriteParam(m, p.frame_id);
- WriteParam(m, p.url);
- WriteParam(m, p.referrer);
- WriteParam(m, p.transition);
- WriteParam(m, p.redirects);
- WriteParam(m, p.should_update_history);
- WriteParam(m, p.searchable_form_url);
- WriteParam(m, p.searchable_form_encoding);
- WriteParam(m, p.password_form);
- WriteParam(m, p.security_info);
- WriteParam(m, p.gesture);
- WriteParam(m, p.contents_mime_type);
- WriteParam(m, p.is_post);
- WriteParam(m, p.was_within_same_page);
- WriteParam(m, p.http_status_code);
- WriteParam(m, p.socket_address);
- WriteParam(m, p.was_fetched_via_proxy);
- WriteParam(m, p.content_state);
-}
-
-bool ParamTraits<ViewHostMsg_FrameNavigate_Params>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->page_id) &&
- ReadParam(m, iter, &p->frame_id) &&
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->referrer) &&
- ReadParam(m, iter, &p->transition) &&
- ReadParam(m, iter, &p->redirects) &&
- ReadParam(m, iter, &p->should_update_history) &&
- ReadParam(m, iter, &p->searchable_form_url) &&
- ReadParam(m, iter, &p->searchable_form_encoding) &&
- ReadParam(m, iter, &p->password_form) &&
- ReadParam(m, iter, &p->security_info) &&
- ReadParam(m, iter, &p->gesture) &&
- ReadParam(m, iter, &p->contents_mime_type) &&
- ReadParam(m, iter, &p->is_post) &&
- ReadParam(m, iter, &p->was_within_same_page) &&
- ReadParam(m, iter, &p->http_status_code) &&
- ReadParam(m, iter, &p->socket_address) &&
- ReadParam(m, iter, &p->was_fetched_via_proxy) &&
- ReadParam(m, iter, &p->content_state);
-}
-
-void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.page_id, l);
- l->append(", ");
- LogParam(p.frame_id, l);
- l->append(", ");
- LogParam(p.url, l);
- l->append(", ");
- LogParam(p.referrer, l);
- l->append(", ");
- LogParam(p.transition, l);
- l->append(", ");
- LogParam(p.redirects, l);
- l->append(", ");
- LogParam(p.should_update_history, l);
- l->append(", ");
- LogParam(p.searchable_form_url, l);
- l->append(", ");
- LogParam(p.searchable_form_encoding, l);
- l->append(", ");
- LogParam(p.password_form, l);
- l->append(", ");
- LogParam(p.security_info, l);
- l->append(", ");
- LogParam(p.gesture, l);
- l->append(", ");
- LogParam(p.contents_mime_type, l);
- l->append(", ");
- LogParam(p.is_post, l);
- l->append(", ");
- LogParam(p.was_within_same_page, l);
- l->append(", ");
- LogParam(p.http_status_code, l);
- l->append(", ");
- LogParam(p.socket_address, l);
- l->append(", ");
- LogParam(p.was_fetched_via_proxy, l);
- l->append(")");
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.bitmap);
- WriteParam(m, p.bitmap_rect);
- WriteParam(m, p.dx);
- WriteParam(m, p.dy);
- WriteParam(m, p.scroll_rect);
- WriteParam(m, p.scroll_offset);
- WriteParam(m, p.copy_rects);
- WriteParam(m, p.view_size);
- WriteParam(m, p.resizer_rect);
- WriteParam(m, p.plugin_window_moves);
- WriteParam(m, p.flags);
-}
-
-bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->bitmap) &&
- ReadParam(m, iter, &p->bitmap_rect) &&
- ReadParam(m, iter, &p->dx) &&
- ReadParam(m, iter, &p->dy) &&
- ReadParam(m, iter, &p->scroll_rect) &&
- ReadParam(m, iter, &p->scroll_offset) &&
- ReadParam(m, iter, &p->copy_rects) &&
- ReadParam(m, iter, &p->view_size) &&
- ReadParam(m, iter, &p->resizer_rect) &&
- ReadParam(m, iter, &p->plugin_window_moves) &&
- ReadParam(m, iter, &p->flags);
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.bitmap, l);
- l->append(", ");
- LogParam(p.bitmap_rect, l);
- l->append(", ");
- LogParam(p.dx, l);
- l->append(", ");
- LogParam(p.dy, l);
- l->append(", ");
- LogParam(p.scroll_rect, l);
- l->append(", ");
- LogParam(p.copy_rects, l);
- l->append(", ");
- LogParam(p.view_size, l);
- l->append(", ");
- LogParam(p.resizer_rect, l);
- l->append(", ");
- LogParam(p.plugin_window_moves, l);
- l->append(", ");
- LogParam(p.flags, l);
- l->append(")");
-}
-
void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) {
WriteParam(m, p.page_size);
WriteParam(m, p.printable_size);
@@ -752,111 +512,6 @@ void ParamTraits<ViewMsg_ExecuteCode_Params>::Log(const param_type& p,
l->append("<ViewMsg_ExecuteCode_Params>");
}
-void ParamTraits<ViewHostMsg_CreateWindow_Params>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.opener_id);
- WriteParam(m, p.user_gesture);
- WriteParam(m, p.window_container_type);
- WriteParam(m, p.session_storage_namespace_id);
- WriteParam(m, p.frame_name);
- WriteParam(m, p.opener_frame_id);
- WriteParam(m, p.opener_url);
- WriteParam(m, p.opener_security_origin);
- WriteParam(m, p.target_url);
-}
-
-bool ParamTraits<ViewHostMsg_CreateWindow_Params>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->opener_id) &&
- ReadParam(m, iter, &p->user_gesture) &&
- ReadParam(m, iter, &p->window_container_type) &&
- ReadParam(m, iter, &p->session_storage_namespace_id) &&
- ReadParam(m, iter, &p->frame_name) &&
- ReadParam(m, iter, &p->opener_frame_id) &&
- ReadParam(m, iter, &p->opener_url) &&
- ReadParam(m, iter, &p->opener_security_origin) &&
- ReadParam(m, iter, &p->target_url);
-}
-
-void ParamTraits<ViewHostMsg_CreateWindow_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.opener_id, l);
- l->append(", ");
- LogParam(p.user_gesture, l);
- l->append(", ");
- LogParam(p.window_container_type, l);
- l->append(", ");
- LogParam(p.session_storage_namespace_id, l);
- l->append(", ");
- LogParam(p.frame_name, l);
- l->append(", ");
- LogParam(p.opener_frame_id, l);
- l->append(", ");
- LogParam(p.opener_url, l);
- l->append(", ");
- LogParam(p.opener_security_origin, l);
- l->append(", ");
- LogParam(p.target_url, l);
- l->append(")");
-}
-
-void ParamTraits<ViewHostMsg_RunFileChooser_Params>::Write(
- Message* m,
- const param_type& p) {
- WriteParam(m, static_cast<int>(p.mode));
- WriteParam(m, p.title);
- WriteParam(m, p.default_file_name);
- WriteParam(m, p.accept_types);
-}
-
-bool ParamTraits<ViewHostMsg_RunFileChooser_Params>::Read(
- const Message* m,
- void** iter,
- param_type* p) {
- int mode;
- if (!ReadParam(m, iter, &mode))
- return false;
- if (mode != param_type::Open &&
- mode != param_type::OpenMultiple &&
- mode != param_type::OpenFolder &&
- mode != param_type::Save)
- return false;
- p->mode = static_cast<param_type::Mode>(mode);
- return
- ReadParam(m, iter, &p->title) &&
- ReadParam(m, iter, &p->default_file_name) &&
- ReadParam(m, iter, &p->accept_types);
-};
-
-void ParamTraits<ViewHostMsg_RunFileChooser_Params>::Log(
- const param_type& p,
- std::string* l) {
- switch (p.mode) {
- case param_type::Open:
- l->append("(Open, ");
- break;
- case param_type::OpenMultiple:
- l->append("(OpenMultiple, ");
- break;
- case param_type::OpenFolder:
- l->append("(OpenFolder, ");
- break;
- case param_type::Save:
- l->append("(Save, ");
- break;
- default:
- l->append("(UNKNOWN, ");
- }
- LogParam(p.title, l);
- l->append(", ");
- LogParam(p.default_file_name, l);
- l->append(", ");
- LogParam(p.accept_types, l);
-}
-
void ParamTraits<ViewMsg_ExtensionLoaded_Params>::Write(Message* m,
const param_type& p) {
WriteParam(m, p.location);
diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h
index 4ce3b86..03d67a1 100644
--- a/chrome/common/render_messages_params.h
+++ b/chrome/common/render_messages_params.h
@@ -18,19 +18,16 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_extent.h"
#include "chrome/common/extensions/url_pattern.h"
-#include "chrome/common/window_container_type.h"
-#include "content/common/navigation_gesture.h"
#include "content/common/navigation_types.h"
#include "content/common/page_transition_types.h"
#include "content/common/serialized_script_value.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_param_traits.h"
-#include "net/base/host_port_pair.h"
+#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/webaccessibility.h"
-#include "webkit/plugins/npapi/webplugin.h"
// TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h,
// $1_print_params.h and $1_render_params.h.
@@ -124,158 +121,6 @@ struct ViewHostMsg_GetSearchProviderInstallState_Params {
}
};
-// Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
-// parameters to be reasonably put in a predefined IPC message.
-struct ViewHostMsg_FrameNavigate_Params {
- ViewHostMsg_FrameNavigate_Params();
- ~ViewHostMsg_FrameNavigate_Params();
-
- // Page ID of this navigation. The renderer creates a new unique page ID
- // anytime a new session history entry is created. This means you'll get new
- // page IDs for user actions, and the old page IDs will be reloaded when
- // iframes are loaded automatically.
- int32 page_id;
-
- // The frame ID for this navigation. The frame ID uniquely identifies the
- // frame the navigation happened in for a given renderer.
- int64 frame_id;
-
- // URL of the page being loaded.
- GURL url;
-
- // URL of the referrer of this load. WebKit generates this based on the
- // source of the event that caused the load.
- GURL referrer;
-
- // The type of transition.
- PageTransition::Type transition;
-
- // Lists the redirects that occurred on the way to the current page. This
- // vector has the same format as reported by the WebDataSource in the glue,
- // with the current page being the last one in the list (so even when
- // there's no redirect, there will be one entry in the list.
- std::vector<GURL> redirects;
-
- // Set to false if we want to update the session history but not update
- // the browser history. E.g., on unreachable urls.
- bool should_update_history;
-
- // See SearchableFormData for a description of these.
- GURL searchable_form_url;
- std::string searchable_form_encoding;
-
- // See password_form.h.
- webkit_glue::PasswordForm password_form;
-
- // Information regarding the security of the connection (empty if the
- // connection was not secure).
- std::string security_info;
-
- // The gesture that initiated this navigation.
- NavigationGesture gesture;
-
- // Contents MIME type of main frame.
- std::string contents_mime_type;
-
- // True if this was a post request.
- bool is_post;
-
- // Whether the frame navigation resulted in no change to the documents within
- // the page. For example, the navigation may have just resulted in scrolling
- // to a named anchor.
- bool was_within_same_page;
-
- // The status code of the HTTP request.
- int http_status_code;
-
- // Remote address of the socket which fetched this resource.
- net::HostPortPair socket_address;
-
- // True if the connection was proxied. In this case, socket_address
- // will represent the address of the proxy, rather than the remote host.
- bool was_fetched_via_proxy;
-
- // Serialized history item state to store in the navigation entry.
- std::string content_state;
-};
-
-// Values that may be OR'd together to form the 'flags' parameter of a
-// ViewHostMsg_UpdateRect_Params structure.
-struct ViewHostMsg_UpdateRect_Flags {
- enum {
- IS_RESIZE_ACK = 1 << 0,
- IS_RESTORE_ACK = 1 << 1,
- IS_REPAINT_ACK = 1 << 2,
- };
- static bool is_resize_ack(int flags) {
- return (flags & IS_RESIZE_ACK) != 0;
- }
- static bool is_restore_ack(int flags) {
- return (flags & IS_RESTORE_ACK) != 0;
- }
- static bool is_repaint_ack(int flags) {
- return (flags & IS_REPAINT_ACK) != 0;
- }
-};
-
-struct ViewHostMsg_UpdateRect_Params {
- ViewHostMsg_UpdateRect_Params();
- ~ViewHostMsg_UpdateRect_Params();
-
- // The bitmap to be painted into the view at the locations specified by
- // update_rects.
- TransportDIB::Id bitmap;
-
- // The position and size of the bitmap.
- gfx::Rect bitmap_rect;
-
- // The scroll offset. Only one of these can be non-zero, and if they are
- // both zero, then it means there is no scrolling and the scroll_rect is
- // ignored.
- int dx;
- int dy;
-
- // The rectangular region to scroll.
- gfx::Rect scroll_rect;
-
- // The scroll offset of the render view.
- gfx::Point scroll_offset;
-
- // The regions of the bitmap (in view coords) that contain updated pixels.
- // In the case of scrolling, this includes the scroll damage rect.
- std::vector<gfx::Rect> copy_rects;
-
- // The size of the RenderView when this message was generated. This is
- // included so the host knows how large the view is from the perspective of
- // the renderer process. This is necessary in case a resize operation is in
- // progress.
- gfx::Size view_size;
-
- // The area of the RenderView reserved for resize corner when this message
- // was generated. Reported for the same reason as view_size is.
- gfx::Rect resizer_rect;
-
- // New window locations for plugin child windows.
- std::vector<webkit::npapi::WebPluginGeometry> plugin_window_moves;
-
- // The following describes the various bits that may be set in flags:
- //
- // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
- // Indicates that this is a response to a ViewMsg_Resize message.
- //
- // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
- // Indicates that this is a response to a ViewMsg_WasRestored message.
- //
- // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
- // Indicates that this is a response to a ViewMsg_Repaint message.
- //
- // If flags is zero, then this message corresponds to an unsoliticed paint
- // request by the render view. Any of the above bits may be set in flags,
- // which would indicate that this paint message is an ACK for multiple
- // request messages.
- int flags;
-};
-
// Parameters for a render request.
struct ViewMsg_Print_Params {
ViewMsg_Print_Params();
@@ -434,73 +279,6 @@ struct ViewMsg_ExecuteCode_Params {
bool all_frames;
};
-struct ViewHostMsg_CreateWindow_Params {
- ViewHostMsg_CreateWindow_Params();
- ~ViewHostMsg_CreateWindow_Params();
-
- // Routing ID of the view initiating the open.
- int opener_id;
-
- // True if this open request came in the context of a user gesture.
- bool user_gesture;
-
- // Type of window requested.
- WindowContainerType window_container_type;
-
- // The session storage namespace ID this view should use.
- int64 session_storage_namespace_id;
-
- // The name of the resulting frame that should be created (empty if none
- // has been specified).
- string16 frame_name;
-
- // The frame identifier of the frame initiating the open.
- int64 opener_frame_id;
-
- // The URL of the frame initiating the open.
- GURL opener_url;
-
- // The security origin of the frame initiating the open.
- std::string opener_security_origin;
-
- // The URL that will be loaded in the new window (empty if none has been
- // sepcified).
- GURL target_url;
-};
-
-struct ViewHostMsg_RunFileChooser_Params {
- enum Mode {
- // Requires that the file exists before allowing the user to pick it.
- Open,
-
- // Like Open, but allows picking multiple files to open.
- OpenMultiple,
-
- // Like Open, but selects a folder.
- OpenFolder,
-
- // Allows picking a nonexistent file, and prompts to overwrite if the file
- // already exists.
- Save,
- };
-
- ViewHostMsg_RunFileChooser_Params();
- ~ViewHostMsg_RunFileChooser_Params();
-
- Mode mode;
-
- // Title to be used for the dialog. This may be empty for the default title,
- // which will be either "Open" or "Save" depending on the mode.
- string16 title;
-
- // Default file name to select in the dialog.
- FilePath default_file_name;
-
- // A comma-separated MIME types such as "audio/*,text/plain", that is used
- // to restrict selectable files to such types.
- string16 accept_types;
-};
-
struct ViewMsg_ExtensionLoaded_Params {
ViewMsg_ExtensionLoaded_Params();
~ViewMsg_ExtensionLoaded_Params();
@@ -631,22 +409,6 @@ struct ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params> {
};
template <>
-struct ParamTraits<ViewHostMsg_FrameNavigate_Params> {
- typedef ViewHostMsg_FrameNavigate_Params param_type;
- 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::string* l);
-};
-
-template <>
-struct ParamTraits<ViewHostMsg_UpdateRect_Params> {
- typedef ViewHostMsg_UpdateRect_Params param_type;
- 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::string* l);
-};
-
-template <>
struct ParamTraits<ViewMsg_Print_Params> {
typedef ViewMsg_Print_Params param_type;
static void Write(Message* m, const param_type& p);
@@ -702,22 +464,6 @@ struct ParamTraits<ViewMsg_ExecuteCode_Params> {
static void Log(const param_type& p, std::string* l);
};
-template<>
-struct ParamTraits<ViewHostMsg_CreateWindow_Params> {
- typedef ViewHostMsg_CreateWindow_Params param_type;
- 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::string* l);
-};
-
-template<>
-struct ParamTraits<ViewHostMsg_RunFileChooser_Params> {
- typedef ViewHostMsg_RunFileChooser_Params param_type;
- 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::string* l);
-};
-
template <>
struct ParamTraits<ViewMsg_ExtensionLoaded_Params> {
typedef ViewMsg_ExtensionLoaded_Params param_type;
diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc
index 5c9bd48..d43ade2 100644
--- a/chrome/common/webkit_param_traits.cc
+++ b/chrome/common/webkit_param_traits.cc
@@ -5,72 +5,9 @@
#include "chrome/common/webkit_param_traits.h"
#include "base/format_macros.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
namespace IPC {
-void ParamTraits<WebKit::WebRect>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.x);
- WriteParam(m, p.y);
- WriteParam(m, p.width);
- WriteParam(m, p.height);
- }
-
-bool ParamTraits<WebKit::WebRect>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->x) &&
- ReadParam(m, iter, &p->y) &&
- ReadParam(m, iter, &p->width) &&
- ReadParam(m, iter, &p->height);
-}
-
-void ParamTraits<WebKit::WebRect>::Log(const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.x, l);
- l->append(", ");
- LogParam(p.y, l);
- l->append(", ");
- LogParam(p.width, l);
- l->append(", ");
- LogParam(p.height, l);
- l->append(")");
-}
-
-void ParamTraits<WebKit::WebScreenInfo>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.depth);
- WriteParam(m, p.depthPerComponent);
- WriteParam(m, p.isMonochrome);
- WriteParam(m, p.rect);
- WriteParam(m, p.availableRect);
-}
-
-bool ParamTraits<WebKit::WebScreenInfo>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->depth) &&
- ReadParam(m, iter, &p->depthPerComponent) &&
- ReadParam(m, iter, &p->isMonochrome) &&
- ReadParam(m, iter, &p->rect) &&
- ReadParam(m, iter, &p->availableRect);
-}
-
-void ParamTraits<WebKit::WebScreenInfo>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.depth, l);
- l->append(", ");
- LogParam(p.depthPerComponent, l);
- l->append(", ");
- LogParam(p.isMonochrome, l);
- l->append(", ");
- LogParam(p.rect, l);
- l->append(", ");
- LogParam(p.availableRect, l);
- l->append(")");
-}
-
void ParamTraits<WebKit::WebCache::ResourceTypeStat>::Log(
const param_type& p, std::string* l) {
l->append(base::StringPrintf("%" PRIuS " %" PRIuS " %" PRIuS " %" PRIuS,
diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h
index 9e7aa48..e640f79 100644
--- a/chrome/common/webkit_param_traits.h
+++ b/chrome/common/webkit_param_traits.h
@@ -29,44 +29,21 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCheckingResult.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h"
namespace WebKit {
struct WebRect;
-struct WebScreenInfo;
}
namespace IPC {
template <>
-struct ParamTraits<WebKit::WebRect> {
- typedef WebKit::WebRect param_type;
- 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::string* l);
-};
-
-template <>
-struct ParamTraits<WebKit::WebScreenInfo> {
- typedef WebKit::WebScreenInfo param_type;
- 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::string* l);
-};
-
-template <>
struct SimilarTypeTraits<WebKit::WebConsoleMessage::Level> {
typedef int Type;
};
template <>
-struct SimilarTypeTraits<WebKit::WebPopupType> {
- typedef int Type;
-};
-
-template <>
struct ParamTraits<WebKit::WebCache::UsageStats> {
typedef WebKit::WebCache::UsageStats param_type;
static void Write(Message* m, const param_type& p) {
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index a821735..3ecc9ee 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -14,6 +14,7 @@
#include "chrome/renderer/blocked_plugin.h"
#include "chrome/renderer/localized_error.h"
#include "chrome/renderer/render_thread.h"
+#include "content/common/view_messages.h"
#include "content/renderer/render_view.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -53,7 +54,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
WebFrame* frame,
const WebPluginParams& params) {
bool found = false;
- ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
+ int plugin_setting = CONTENT_SETTING_DEFAULT;
CommandLine* cmd = CommandLine::ForCurrentProcess();
webkit::npapi::WebPluginInfo info;
GURL url(params.url);
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index 6da0ba1..9d63c77 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -27,6 +27,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/render_thread.h"
+#include "content/common/view_messages.h"
#include "content/renderer/render_view.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message_utils.h"
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index 5926163..acaa631 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -25,6 +25,7 @@
#include "chrome/renderer/render_thread.h"
#include "content/common/clipboard_messages.h"
#include "content/common/socket_stream_dispatcher.h"
+#include "content/common/view_messages.h"
#include "content/plugin/npobject_util.h"
#include "googleurl/src/url_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 283d5bd..98c8623 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -692,7 +692,7 @@ void RenderMessageFilter::OnGotPluginInfo(
const std::string& actual_mime_type,
const GURL& policy_url,
IPC::Message* reply_msg) {
- ContentSetting setting = CONTENT_SETTING_DEFAULT;
+ int content_setting = CONTENT_SETTING_DEFAULT;
webkit::npapi::WebPluginInfo info_copy = info;
if (found) {
// TODO(mpcomplete): The plugin service should do this check. We should
@@ -703,14 +703,14 @@ void RenderMessageFilter::OnGotPluginInfo(
std::string resource =
webkit::npapi::PluginList::Singleton()->GetPluginGroupIdentifier(
info_copy);
- setting = content_settings_->GetContentSetting(
+ content_setting = content_settings_->GetContentSetting(
policy_url,
CONTENT_SETTINGS_TYPE_PLUGINS,
resource);
}
ViewHostMsg_GetPluginInfo::WriteReplyParams(
- reply_msg, found, info_copy, setting, actual_mime_type);
+ reply_msg, found, info_copy, content_setting, actual_mime_type);
Send(reply_msg);
}
diff --git a/content/browser/renderer_host/render_message_filter_gtk.cc b/content/browser/renderer_host/render_message_filter_gtk.cc
index 9deac18..8d91b57 100644
--- a/content/browser/renderer_host/render_message_filter_gtk.cc
+++ b/content/browser/renderer_host/render_message_filter_gtk.cc
@@ -6,6 +6,7 @@
#include "chrome/common/render_messages.h"
#include "content/browser/browser_thread.h"
+#include "content/common/view_messages.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h"
#include "ui/base/clipboard/clipboard.h"
diff --git a/content/browser/renderer_host/render_message_filter_win.cc b/content/browser/renderer_host/render_message_filter_win.cc
index 4f305fde..f9c1bb5 100644
--- a/content/browser/renderer_host/render_message_filter_win.cc
+++ b/content/browser/renderer_host/render_message_filter_win.cc
@@ -4,7 +4,7 @@
#include "content/browser/renderer_host/render_message_filter.h"
-#include "chrome/common/render_messages.h"
+#include "content/common/view_messages.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h"
diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h
index 8777a3b..ba08905 100644
--- a/content/browser/renderer_host/render_view_host.h
+++ b/content/browser/renderer_host/render_view_host.h
@@ -16,9 +16,9 @@
#include "chrome/common/render_view_commands.h"
#include "chrome/common/translate_errors.h"
#include "chrome/common/view_types.h"
-#include "chrome/common/window_container_type.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/common/page_zoom.h"
+#include "content/common/window_container_type.h"
#include "net/base/load_states.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc
index 6c4a771..5ad7927 100644
--- a/content/browser/renderer_host/render_view_host_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_browsertest.cc
@@ -9,12 +9,12 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_specific_content_settings.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/common/render_messages_params.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/common/view_messages.h"
#include "net/base/host_port_pair.h"
#include "net/test/test_server.h"
diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h
index b50318b..b672618 100644
--- a/content/browser/renderer_host/render_view_host_delegate.h
+++ b/content/browser/renderer_host/render_view_host_delegate.h
@@ -16,8 +16,8 @@
#include "chrome/common/content_settings_types.h"
#include "chrome/common/translate_errors.h"
#include "chrome/common/view_types.h"
-#include "chrome/common/window_container_type.h"
#include "content/common/dom_storage_common.h"
+#include "content/common/window_container_type.h"
#include "ipc/ipc_channel.h"
#include "net/base/load_states.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
diff --git a/content/browser/renderer_host/render_widget_helper.h b/content/browser/renderer_host/render_widget_helper.h
index 0dd25d7..1b3eae5 100644
--- a/content/browser/renderer_host/render_widget_helper.h
+++ b/content/browser/renderer_host/render_widget_helper.h
@@ -15,7 +15,7 @@
#include "base/ref_counted.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
-#include "chrome/common/window_container_type.h"
+#include "content/common/window_container_type.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
namespace IPC {
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index d9e43f7..816f867 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -3,8 +3,6 @@
// found in the LICENSE file.
#include "chrome/browser/browser_url_handler.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
#include "chrome/test/testing_profile.h"
#include "content/browser/renderer_host/test_backing_store.h"
#include "content/browser/renderer_host/test_render_view_host.h"
@@ -13,6 +11,7 @@
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/content_client.h"
#include "content/common/dom_storage_common.h"
+#include "content/common/view_messages.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
diff --git a/content/browser/tab_contents/interstitial_page.cc b/content/browser/tab_contents/interstitial_page.cc
index 1b5aa79..aca0108 100644
--- a/content/browser/tab_contents/interstitial_page.cc
+++ b/content/browser/tab_contents/interstitial_page.cc
@@ -18,7 +18,6 @@
#include "chrome/browser/renderer_preferences_util.h"
#include "chrome/common/bindings_policy.h"
#include "chrome/common/net/url_request_context_getter.h"
-#include "chrome/common/render_messages_params.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -33,6 +32,7 @@
#include "content/common/notification_service.h"
#include "content/common/notification_source.h"
#include "content/common/page_transition_types.h"
+#include "content/common/view_messages.h"
#include "net/base/escape.h"
using WebKit::WebDragOperation;
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index a784446..5d76b05 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/sessions/session_types.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/pref_names.h"
-#include "chrome/common/render_messages_params.h"
#include "chrome/common/url_constants.h"
#include "content/browser/in_process_webkit/session_storage_namespace.h"
#include "content/browser/site_instance.h"
@@ -26,6 +25,7 @@
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/common/navigation_types.h"
#include "content/common/notification_service.h"
+#include "content/common/view_messages.h"
#include "grit/app_resources.h"
#include "net/base/escape.h"
#include "net/base/mime_util.h"
diff --git a/content/browser/tab_contents/tab_contents_view.cc b/content/browser/tab_contents/tab_contents_view.cc
index 771669b..a4e5c7b 100644
--- a/content/browser/tab_contents/tab_contents_view.cc
+++ b/content/browser/tab_contents/tab_contents_view.cc
@@ -4,7 +4,6 @@
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "chrome/common/render_messages_params.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
@@ -13,6 +12,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/common/notification_service.h"
+#include "content/common/view_messages.h"
TabContentsView::TabContentsView(TabContents* tab_contents)
: tab_contents_(tab_contents) {
diff --git a/content/common/common_param_traits.cc b/content/common/common_param_traits.cc
index df7bfde..8694bb2 100644
--- a/content/common/common_param_traits.cc
+++ b/content/common/common_param_traits.cc
@@ -11,6 +11,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/rect.h"
+#include "webkit/glue/password_form.h"
#include "webkit/glue/resource_loader_bridge.h"
namespace {
@@ -836,4 +837,43 @@ void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) {
l->append("<SkBitmap>");
}
+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::string* l) {
+ l->append("<PasswordForm>");
+}
+
} // namespace IPC
diff --git a/content/common/common_param_traits.h b/content/common/common_param_traits.h
index a2c126a..8a09924 100644
--- a/content/common/common_param_traits.h
+++ b/content/common/common_param_traits.h
@@ -29,6 +29,7 @@
#include "webkit/glue/npruntime_util.h"
#include "webkit/glue/resource_type.h"
#include "webkit/glue/webcursor.h"
+#include "webkit/glue/window_open_disposition.h"
class SkBitmap;
@@ -45,6 +46,7 @@ class UploadData;
}
namespace webkit_glue {
+struct PasswordForm;
struct ResourceDevToolsInfo;
struct ResourceLoadTimingInfo;
}
@@ -398,6 +400,18 @@ struct ParamTraits<SkBitmap> {
static void Log(const param_type& p, std::string* l);
};
+template <>
+struct SimilarTypeTraits<WindowOpenDisposition> {
+ typedef int Type;
+};
+
+template <>
+struct ParamTraits<webkit_glue::PasswordForm> {
+ typedef webkit_glue::PasswordForm param_type;
+ 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::string* l);
+};
} // namespace IPC
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index ea9fcbc..a6be921 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -5,27 +5,78 @@
// IPC messages for page rendering.
// Multiply-included message file, hence no include guard.
+#include "base/process.h"
#include "content/common/common_param_traits.h"
#include "content/common/css_colors.h"
#include "content/common/edit_command.h"
+#include "content/common/navigation_gesture.h"
#include "content/common/page_transition_types.h"
#include "content/common/page_zoom.h"
#include "content/common/renderer_preferences.h"
+#include "content/common/window_container_type.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
+#include "net/base/host_port_pair.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/context_menu.h"
+#include "webkit/glue/password_form.h"
+#include "webkit/glue/webcookie.h"
#include "webkit/glue/webmenuitem.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+
+#if defined(OS_MACOSX)
+#include "content/common/font_descriptor_mac.h"
+#endif
// Define enums used in this file inside an include-guard.
#ifndef CONTENT_COMMON_VIEW_MESSAGES_H_
#define CONTENT_COMMON_VIEW_MESSAGES_H_
-class ViewMsg_Navigate_Type {
+struct ViewHostMsg_RunFileChooser_Mode {
+ public:
+ enum Value {
+ // Requires that the file exists before allowing the user to pick it.
+ Open,
+
+ // Like Open, but allows picking multiple files to open.
+ OpenMultiple,
+
+ // Like Open, but selects a folder.
+ OpenFolder,
+
+ // Allows picking a nonexistent file, and prompts to overwrite if the file
+ // already exists.
+ Save,
+ };
+};
+
+// Values that may be OR'd together to form the 'flags' parameter of a
+// ViewHostMsg_UpdateRect_Params structure.
+struct ViewHostMsg_UpdateRect_Flags {
+ enum {
+ IS_RESIZE_ACK = 1 << 0,
+ IS_RESTORE_ACK = 1 << 1,
+ IS_REPAINT_ACK = 1 << 2,
+ };
+ static bool is_resize_ack(int flags) {
+ return (flags & IS_RESIZE_ACK) != 0;
+ }
+ static bool is_restore_ack(int flags) {
+ return (flags & IS_RESTORE_ACK) != 0;
+ }
+ static bool is_repaint_ack(int flags) {
+ return (flags & IS_REPAINT_ACK) != 0;
+ }
+};
+
+struct ViewMsg_Navigate_Type {
public:
enum Value {
// Reload the page.
@@ -69,20 +120,60 @@ struct ViewMsg_StopFinding_Params {
#define IPC_MESSAGE_START ViewMsgStart
IPC_ENUM_TRAITS(CSSColors::CSSColorName)
+IPC_ENUM_TRAITS(NavigationGesture)
IPC_ENUM_TRAITS(PageZoom::Function)
IPC_ENUM_TRAITS(RendererPreferencesHintingEnum)
IPC_ENUM_TRAITS(RendererPreferencesSubpixelRenderingEnum)
+IPC_ENUM_TRAITS(ViewHostMsg_RunFileChooser_Mode::Value)
IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value)
IPC_ENUM_TRAITS(ViewMsg_StopFinding_Params::Action)
IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType)
IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type)
+IPC_ENUM_TRAITS(WebKit::WebPopupType)
IPC_ENUM_TRAITS(WebMenuItem::Type)
+IPC_ENUM_TRAITS(WindowContainerType)
+
+IPC_STRUCT_TRAITS_BEGIN(ContextMenuParams)
+ IPC_STRUCT_TRAITS_MEMBER(media_type)
+ IPC_STRUCT_TRAITS_MEMBER(x)
+ IPC_STRUCT_TRAITS_MEMBER(y)
+ IPC_STRUCT_TRAITS_MEMBER(link_url)
+ IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url)
+ IPC_STRUCT_TRAITS_MEMBER(src_url)
+ IPC_STRUCT_TRAITS_MEMBER(is_image_blocked)
+ IPC_STRUCT_TRAITS_MEMBER(page_url)
+ IPC_STRUCT_TRAITS_MEMBER(frame_url)
+ IPC_STRUCT_TRAITS_MEMBER(frame_content_state)
+ IPC_STRUCT_TRAITS_MEMBER(media_flags)
+ IPC_STRUCT_TRAITS_MEMBER(selection_text)
+ IPC_STRUCT_TRAITS_MEMBER(misspelled_word)
+ IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
+ IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
+ IPC_STRUCT_TRAITS_MEMBER(is_editable)
+#if defined(OS_MACOSX)
+ IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
+ IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
+ IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
+#endif // OS_MACOSX
+ IPC_STRUCT_TRAITS_MEMBER(edit_flags)
+ IPC_STRUCT_TRAITS_MEMBER(security_info)
+ IPC_STRUCT_TRAITS_MEMBER(frame_charset)
+ IPC_STRUCT_TRAITS_MEMBER(custom_context)
+ IPC_STRUCT_TRAITS_MEMBER(custom_items)
+IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(EditCommand)
IPC_STRUCT_TRAITS_MEMBER(name)
IPC_STRUCT_TRAITS_MEMBER(value)
IPC_STRUCT_TRAITS_END()
+#if defined(OS_MACOSX)
+IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
+ IPC_STRUCT_TRAITS_MEMBER(font_name)
+ IPC_STRUCT_TRAITS_MEMBER(font_point_size)
+IPC_STRUCT_TRAITS_END()
+#endif
+
IPC_STRUCT_TRAITS_BEGIN(RendererPreferences)
IPC_STRUCT_TRAITS_MEMBER(can_accept_load_drops)
IPC_STRUCT_TRAITS_MEMBER(should_antialias_text)
@@ -122,6 +213,21 @@ IPC_STRUCT_TRAITS_BEGIN(WebKit::WebMediaPlayerAction)
IPC_STRUCT_TRAITS_MEMBER(enable)
IPC_STRUCT_TRAITS_END()
+IPC_STRUCT_TRAITS_BEGIN(WebKit::WebRect)
+ IPC_STRUCT_TRAITS_MEMBER(x)
+ IPC_STRUCT_TRAITS_MEMBER(y)
+ IPC_STRUCT_TRAITS_MEMBER(width)
+ IPC_STRUCT_TRAITS_MEMBER(height)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo)
+ IPC_STRUCT_TRAITS_MEMBER(depth)
+ IPC_STRUCT_TRAITS_MEMBER(depthPerComponent)
+ IPC_STRUCT_TRAITS_MEMBER(isMonochrome)
+ IPC_STRUCT_TRAITS_MEMBER(rect)
+ IPC_STRUCT_TRAITS_MEMBER(availableRect)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(WebPreferences)
IPC_STRUCT_TRAITS_MEMBER(standard_font_family)
IPC_STRUCT_TRAITS_MEMBER(fixed_font_family)
@@ -197,69 +303,73 @@ IPC_STRUCT_TRAITS_BEGIN(webkit_glue::CustomContextMenuContext)
IPC_STRUCT_TRAITS_MEMBER(request_id)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(ContextMenuParams)
- IPC_STRUCT_TRAITS_MEMBER(media_type)
- IPC_STRUCT_TRAITS_MEMBER(x)
- IPC_STRUCT_TRAITS_MEMBER(y)
- IPC_STRUCT_TRAITS_MEMBER(link_url)
- IPC_STRUCT_TRAITS_MEMBER(unfiltered_link_url)
- IPC_STRUCT_TRAITS_MEMBER(src_url)
- IPC_STRUCT_TRAITS_MEMBER(is_image_blocked)
- IPC_STRUCT_TRAITS_MEMBER(page_url)
- IPC_STRUCT_TRAITS_MEMBER(frame_url)
- IPC_STRUCT_TRAITS_MEMBER(frame_content_state)
- IPC_STRUCT_TRAITS_MEMBER(media_flags)
- IPC_STRUCT_TRAITS_MEMBER(selection_text)
- IPC_STRUCT_TRAITS_MEMBER(misspelled_word)
- IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions)
- IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled)
- IPC_STRUCT_TRAITS_MEMBER(is_editable)
-#if defined(OS_MACOSX)
- IPC_STRUCT_TRAITS_MEMBER(writing_direction_default)
- IPC_STRUCT_TRAITS_MEMBER(writing_direction_left_to_right)
- IPC_STRUCT_TRAITS_MEMBER(writing_direction_right_to_left)
-#endif // OS_MACOSX
- IPC_STRUCT_TRAITS_MEMBER(edit_flags)
- IPC_STRUCT_TRAITS_MEMBER(security_info)
- IPC_STRUCT_TRAITS_MEMBER(frame_charset)
- IPC_STRUCT_TRAITS_MEMBER(custom_context)
- IPC_STRUCT_TRAITS_MEMBER(custom_items)
+IPC_STRUCT_TRAITS_BEGIN(webkit_glue::WebCookie)
+ IPC_STRUCT_TRAITS_MEMBER(name)
+ IPC_STRUCT_TRAITS_MEMBER(value)
+ IPC_STRUCT_TRAITS_MEMBER(domain)
+ IPC_STRUCT_TRAITS_MEMBER(path)
+ IPC_STRUCT_TRAITS_MEMBER(expires)
+ IPC_STRUCT_TRAITS_MEMBER(http_only)
+ IPC_STRUCT_TRAITS_MEMBER(secure)
+ IPC_STRUCT_TRAITS_MEMBER(session)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_BEGIN(ViewMsg_ClosePage_Params)
- // The identifier of the RenderProcessHost for the currently closing view.
- //
- // These first two parameters are technically redundant since they are
- // needed only when processing the ACK message, and the processor
- // theoretically knows both the process and route ID. However, this is
- // difficult to figure out with our current implementation, so this
- // information is duplicate here.
- IPC_STRUCT_MEMBER(int, closing_process_id)
+IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginGeometry)
+ IPC_STRUCT_TRAITS_MEMBER(window)
+ IPC_STRUCT_TRAITS_MEMBER(window_rect)
+ IPC_STRUCT_TRAITS_MEMBER(clip_rect)
+ IPC_STRUCT_TRAITS_MEMBER(cutout_rects)
+ IPC_STRUCT_TRAITS_MEMBER(rects_valid)
+ IPC_STRUCT_TRAITS_MEMBER(visible)
+IPC_STRUCT_TRAITS_END()
- // The route identifier for the currently closing RenderView.
- IPC_STRUCT_MEMBER(int, closing_route_id)
+IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginMimeType)
+ IPC_STRUCT_TRAITS_MEMBER(mime_type)
+ IPC_STRUCT_TRAITS_MEMBER(file_extensions)
+ IPC_STRUCT_TRAITS_MEMBER(description)
+IPC_STRUCT_TRAITS_END()
- // True when this close is for the first (closing) tab of a cross-site
- // transition where we switch processes. False indicates the close is for the
- // entire tab.
- //
- // When true, the new_* variables below must be filled in. Otherwise they must
- // both be -1.
- IPC_STRUCT_MEMBER(bool, for_cross_site_transition)
+IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginInfo)
+ IPC_STRUCT_TRAITS_MEMBER(name)
+ IPC_STRUCT_TRAITS_MEMBER(path)
+ IPC_STRUCT_TRAITS_MEMBER(version)
+ IPC_STRUCT_TRAITS_MEMBER(desc)
+ IPC_STRUCT_TRAITS_MEMBER(mime_types)
+ IPC_STRUCT_TRAITS_MEMBER(enabled)
+IPC_STRUCT_TRAITS_END()
- // The identifier of the RenderProcessHost for the new view attempting to
- // replace the closing one above. This must be valid when
- // for_cross_site_transition is set, and must be -1 otherwise.
- IPC_STRUCT_MEMBER(int, new_render_process_host_id)
+IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params)
+ // Routing ID of the view initiating the open.
+ IPC_STRUCT_MEMBER(int, opener_id)
- // The identifier of the *request* the new view made that is causing the
- // cross-site transition. This is *not* a route_id, but the request that we
- // will resume once the ACK from the closing view has been received. This
- // must be valid when for_cross_site_transition is set, and must be -1
- // otherwise.
- IPC_STRUCT_MEMBER(int, new_request_id)
+ // True if this open request came in the context of a user gesture.
+ IPC_STRUCT_MEMBER(bool, user_gesture)
+
+ // Type of window requested.
+ IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
+
+ // The session storage namespace ID this view should use.
+ IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
+
+ // The name of the resulting frame that should be created (empty if none
+ // has been specified).
+ IPC_STRUCT_MEMBER(string16, frame_name)
+
+ // The frame identifier of the frame initiating the open.
+ IPC_STRUCT_MEMBER(int64, opener_frame_id)
+
+ // The URL of the frame initiating the open.
+ IPC_STRUCT_MEMBER(GURL, opener_url)
+
+ // The security origin of the frame initiating the open.
+ IPC_STRUCT_MEMBER(std::string, opener_security_origin)
+
+ // The URL that will be loaded in the new window (empty if none has been
+ // sepcified).
+ IPC_STRUCT_MEMBER(GURL, target_url)
IPC_STRUCT_END()
+
IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
// URL for the worker script.
IPC_STRUCT_MEMBER(GURL, url)
@@ -288,6 +398,78 @@ IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
IPC_STRUCT_MEMBER(int64, script_resource_appcache_id)
IPC_STRUCT_END()
+// Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
+// parameters to be reasonably put in a predefined IPC message.
+IPC_STRUCT_BEGIN(ViewHostMsg_FrameNavigate_Params)
+ // Page ID of this navigation. The renderer creates a new unique page ID
+ // anytime a new session history entry is created. This means you'll get new
+ // page IDs for user actions, and the old page IDs will be reloaded when
+ // iframes are loaded automatically.
+ IPC_STRUCT_MEMBER(int32, page_id)
+
+ // The frame ID for this navigation. The frame ID uniquely identifies the
+ // frame the navigation happened in for a given renderer.
+ IPC_STRUCT_MEMBER(int64, frame_id)
+
+ // URL of the page being loaded.
+ IPC_STRUCT_MEMBER(GURL, url)
+
+ // URL of the referrer of this load. WebKit generates this based on the
+ // source of the event that caused the load.
+ IPC_STRUCT_MEMBER(GURL, referrer)
+
+ // The type of transition.
+ IPC_STRUCT_MEMBER(PageTransition::Type, transition)
+
+ // Lists the redirects that occurred on the way to the current page. This
+ // vector has the same format as reported by the WebDataSource in the glue,
+ // with the current page being the last one in the list (so even when
+ // there's no redirect, there will be one entry in the list.
+ IPC_STRUCT_MEMBER(std::vector<GURL>, redirects)
+
+ // Set to false if we want to update the session history but not update
+ // the browser history. E.g., on unreachable urls.
+ IPC_STRUCT_MEMBER(bool, should_update_history)
+
+ // See SearchableFormData for a description of these.
+ IPC_STRUCT_MEMBER(GURL, searchable_form_url)
+ IPC_STRUCT_MEMBER(std::string, searchable_form_encoding)
+
+ // See password_form.h.
+ IPC_STRUCT_MEMBER(webkit_glue::PasswordForm, password_form)
+
+ // Information regarding the security of the connection (empty if the
+ // connection was not secure).
+ IPC_STRUCT_MEMBER(std::string, security_info)
+
+ // The gesture that initiated this navigation.
+ IPC_STRUCT_MEMBER(NavigationGesture, gesture)
+
+ // Contents MIME type of main frame.
+ IPC_STRUCT_MEMBER(std::string, contents_mime_type)
+
+ // True if this was a post request.
+ IPC_STRUCT_MEMBER(bool, is_post)
+
+ // Whether the frame navigation resulted in no change to the documents within
+ // the page. For example, the navigation may have just resulted in scrolling
+ // to a named anchor.
+ IPC_STRUCT_MEMBER(bool, was_within_same_page)
+
+ // The status code of the HTTP request.
+ IPC_STRUCT_MEMBER(int, http_status_code)
+
+ // Remote address of the socket which fetched this resource.
+ IPC_STRUCT_MEMBER(net::HostPortPair, socket_address)
+
+ // True if the connection was proxied. In this case, socket_address
+ // will represent the address of the proxy, rather than the remote host.
+ IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy)
+
+ // Serialized history item state to store in the navigation entry.
+ IPC_STRUCT_MEMBER(std::string, content_state)
+IPC_STRUCT_END()
+
IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params)
// The page_id for this navigation, or -1 if it is a new navigation. Back,
// Forward, and Reload navigations should have a valid page_id. If the load
@@ -329,6 +511,21 @@ IPC_STRUCT_BEGIN(ViewMsg_Navigate_Params)
IPC_STRUCT_MEMBER(std::string, extra_headers)
IPC_STRUCT_END()
+IPC_STRUCT_BEGIN(ViewHostMsg_RunFileChooser_Params)
+ IPC_STRUCT_MEMBER(ViewHostMsg_RunFileChooser_Mode::Value, mode)
+
+ // Title to be used for the dialog. This may be empty for the default title,
+ // which will be either "Open" or "Save" depending on the mode.
+ IPC_STRUCT_MEMBER(string16, title)
+
+ // Default file name to select in the dialog.
+ IPC_STRUCT_MEMBER(FilePath, default_file_name)
+
+ // A comma-separated MIME types such as "audio/*,text/plain", that is used
+ // to restrict selectable files to such types.
+ IPC_STRUCT_MEMBER(string16, accept_types)
+IPC_STRUCT_END()
+
// This message is used for supporting popup menus on Mac OS X using native
// Cocoa controls. The renderer sends us this message which we use to populate
// the popup menu.
@@ -352,6 +549,96 @@ IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params)
IPC_STRUCT_MEMBER(bool, right_aligned)
IPC_STRUCT_END()
+IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
+ // The bitmap to be painted into the view at the locations specified by
+ // update_rects.
+ IPC_STRUCT_MEMBER(TransportDIB::Id, bitmap)
+
+ // The position and size of the bitmap.
+ IPC_STRUCT_MEMBER(gfx::Rect, bitmap_rect)
+
+ // The scroll offset. Only one of these can be non-zero, and if they are
+ // both zero, then it means there is no scrolling and the scroll_rect is
+ // ignored.
+ IPC_STRUCT_MEMBER(int, dx)
+ IPC_STRUCT_MEMBER(int, dy)
+
+ // The rectangular region to scroll.
+ IPC_STRUCT_MEMBER(gfx::Rect, scroll_rect)
+
+ // The scroll offset of the render view.
+ IPC_STRUCT_MEMBER(gfx::Point, scroll_offset)
+
+ // The regions of the bitmap (in view coords) that contain updated pixels.
+ // In the case of scrolling, this includes the scroll damage rect.
+ IPC_STRUCT_MEMBER(std::vector<gfx::Rect>, copy_rects)
+
+ // The size of the RenderView when this message was generated. This is
+ // included so the host knows how large the view is from the perspective of
+ // the renderer process. This is necessary in case a resize operation is in
+ // progress.
+ IPC_STRUCT_MEMBER(gfx::Size, view_size)
+
+ // The area of the RenderView reserved for resize corner when this message
+ // was generated. Reported for the same reason as view_size is.
+ IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
+
+ // New window locations for plugin child windows.
+ IPC_STRUCT_MEMBER(std::vector<webkit::npapi::WebPluginGeometry>,
+ plugin_window_moves)
+
+ // The following describes the various bits that may be set in flags:
+ //
+ // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
+ // Indicates that this is a response to a ViewMsg_Resize message.
+ //
+ // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
+ // Indicates that this is a response to a ViewMsg_WasRestored message.
+ //
+ // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
+ // Indicates that this is a response to a ViewMsg_Repaint message.
+ //
+ // If flags is zero, then this message corresponds to an unsoliticed paint
+ // request by the render view. Any of the above bits may be set in flags,
+ // which would indicate that this paint message is an ACK for multiple
+ // request messages.
+ IPC_STRUCT_MEMBER(int, flags)
+IPC_STRUCT_END()
+
+IPC_STRUCT_BEGIN(ViewMsg_ClosePage_Params)
+ // The identifier of the RenderProcessHost for the currently closing view.
+ //
+ // These first two parameters are technically redundant since they are
+ // needed only when processing the ACK message, and the processor
+ // theoretically knows both the process and route ID. However, this is
+ // difficult to figure out with our current implementation, so this
+ // information is duplicate here.
+ IPC_STRUCT_MEMBER(int, closing_process_id)
+
+ // The route identifier for the currently closing RenderView.
+ IPC_STRUCT_MEMBER(int, closing_route_id)
+
+ // True when this close is for the first (closing) tab of a cross-site
+ // transition where we switch processes. False indicates the close is for the
+ // entire tab.
+ //
+ // When true, the new_* variables below must be filled in. Otherwise they must
+ // both be -1.
+ IPC_STRUCT_MEMBER(bool, for_cross_site_transition)
+
+ // The identifier of the RenderProcessHost for the new view attempting to
+ // replace the closing one above. This must be valid when
+ // for_cross_site_transition is set, and must be -1 otherwise.
+ IPC_STRUCT_MEMBER(int, new_render_process_host_id)
+
+ // The identifier of the *request* the new view made that is causing the
+ // cross-site transition. This is *not* a route_id, but the request that we
+ // will resume once the ACK from the closing view has been received. This
+ // must be valid when for_cross_site_transition is set, and must be -1
+ // otherwise.
+ IPC_STRUCT_MEMBER(int, new_request_id)
+IPC_STRUCT_END()
+
IPC_STRUCT_BEGIN(ViewMsg_New_Params)
// The parent window's id.
IPC_STRUCT_MEMBER(gfx::NativeViewId, parent_window)
@@ -786,6 +1073,82 @@ IPC_MESSAGE_ROUTED1(ViewMsg_NetworkStateChanged,
// Messages sent from the renderer to the browser.
+// Sent by the renderer when it is creating a new window. The browser creates
+// a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
+// MSG_ROUTING_NONE, the view couldn't be created.
+IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateWindow,
+ ViewHostMsg_CreateWindow_Params,
+ int /* route_id */,
+ int64 /* cloned_session_storage_namespace_id */)
+
+// Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
+// <select> dropdowns. This message is sent to the TabContents that
+// contains the widget being created.
+IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWidget,
+ int /* opener_id */,
+ WebKit::WebPopupType /* popup type */,
+ int /* route_id */)
+
+// Similar to ViewHostMsg_CreateWidget except the widget is a full screen
+// window.
+IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateFullscreenWidget,
+ int /* opener_id */,
+ int /* route_id */)
+
+// These three messages are sent to the parent RenderViewHost to display the
+// page/widget that was created by
+// CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
+// refers to the id that was returned from the Create message above.
+// The initial_position parameter is a rectangle in screen coordinates.
+//
+// FUTURE: there will probably be flags here to control if the result is
+// in a new window.
+IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
+ int /* route_id */,
+ WindowOpenDisposition /* disposition */,
+ gfx::Rect /* initial_pos */,
+ bool /* opened_by_user_gesture */)
+
+IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
+ int /* route_id */,
+ gfx::Rect /* initial_pos */)
+
+// Message to show a full screen widget.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
+ int /* route_id */)
+
+// This message is sent after ViewHostMsg_ShowView to cause the RenderView
+// to run in a modal fashion until it is closed.
+IPC_SYNC_MESSAGE_ROUTED0_0(ViewHostMsg_RunModal)
+
+// Indicates the renderer is ready in response to a ViewMsg_New or
+// a ViewMsg_CreatingNew_ACK.
+IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
+
+// Indicates the renderer process is gone. This actually is sent by the
+// browser process to itself, but keeps the interface cleaner.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderViewGone,
+ int, /* this really is base::TerminationStatus */
+ int /* exit_code */)
+
+// Sent by the renderer process to request that the browser close the view.
+// This corresponds to the window.close() API, and the browser may ignore
+// this message. Otherwise, the browser will generates a ViewMsg_Close
+// message to close the view.
+IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
+
+// Sent by the renderer process to request that the browser move the view.
+// This corresponds to the window.resizeTo() and window.moveTo() APIs, and
+// the browser may ignore this message.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
+ gfx::Rect /* position */)
+
+// Notifies the browser that a frame in the view has changed. This message
+// has a lot of parameters and is packed/unpacked by functions defined in
+// render_messages.h.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate,
+ ViewHostMsg_FrameNavigate_Params)
+
// Used to tell the parent that the user right clicked on an area of the
// content area, and a context menu should be shown for it. The params
// object contains information about the node(s) that were selected when the
@@ -829,6 +1192,223 @@ IPC_MESSAGE_ROUTED1(ViewHostMsg_ShouldClose_ACK,
IPC_MESSAGE_ROUTED1(ViewHostMsg_ClosePage_ACK,
ViewMsg_ClosePage_Params)
+// Notifies the browser that we have session history information.
+// page_id: unique ID that allows us to distinguish between history entries.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
+ int32 /* page_id */,
+ std::string /* state */)
+
+// Notifies the browser that a document has been loaded in a frame.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame,
+ int64 /* frame_id */)
+
+// Notifies the browser that a frame finished loading.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFinishLoad,
+ int64 /* frame_id */)
+
+// Changes the title for the page in the UI when the page is navigated or the
+// title changes.
+// TODO(darin): use a UTF-8 string to reduce data size
+IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTitle,
+ int32,
+ std::wstring)
+
+// Changes the icon url for the page in the UI.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateIconURL,
+ int32,
+ GURL)
+
+// Change the encoding name of the page in UI when the page has detected
+// proper encoding name.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
+ std::string /* new encoding name */)
+
+// Notifies the browser that we want to show a destination url for a potential
+// action (e.g. when the user is hovering over a link).
+IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL,
+ int32,
+ GURL)
+
+// Sent when the renderer starts loading the page. This corresponds to
+// WebKit's notion of the throbber starting. Note that sometimes you may get
+// duplicates of these during a single load.
+IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading)
+
+// Sent when the renderer is done loading a page. This corresponds to WebKit's
+// notion of the throbber stopping.
+IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading)
+
+// Sent when the renderer main frame has made progress loading.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
+ double /* load_progress */)
+
+// Sent when the document element is available for the toplevel frame. This
+// happens after the page starts loading, but before all resources are
+// finished.
+IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
+
+// Sent when after the onload handler has been invoked for the document
+// in the toplevel frame.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
+ int32 /* page_id */)
+
+// Sent when the renderer loads a resource from its memory cache.
+// The security info is non empty if the resource was originally loaded over
+// a secure connection.
+// Note: May only be sent once per URL per frame per committed load.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_DidLoadResourceFromMemoryCache,
+ GURL /* url */,
+ std::string /* security info */)
+
+// Sent when the renderer displays insecure content in a secure page.
+IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
+
+// Sent when the renderer runs insecure content in a secure origin.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
+ std::string /* security_origin */,
+ GURL /* target URL */)
+
+// Sent when the renderer starts a provisional load for a frame.
+IPC_MESSAGE_ROUTED3(ViewHostMsg_DidStartProvisionalLoadForFrame,
+ int64 /* frame_id */,
+ bool /* true if it is the main frame */,
+ GURL /* url */)
+
+// Sent when the renderer fails a provisional load with an error.
+IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailProvisionalLoadWithError,
+ int64 /* frame_id */,
+ bool /* true if it is the main frame */,
+ int /* error_code */,
+ GURL /* url */,
+ bool /* true if the failure is the result of
+ navigating to a POST again and we're going to
+ show the POST interstitial */)
+
+// Tells the render view that a ViewHostMsg_PaintAtSize message was
+// processed, and the DIB is ready for use. |tag| has the same value that
+// the tag sent along with ViewMsg_PaintAtSize.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK,
+ int /* tag */,
+ gfx::Size /* size */)
+
+// Sent to update part of the view. In response to this message, the host
+// generates a ViewMsg_UpdateRect_ACK message.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
+ ViewHostMsg_UpdateRect_Params)
+
+// Sent by the renderer when accelerated compositing is enabled or disabled to
+// notify the browser whether or not is should do painting.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
+ bool /* true if the accelerated compositor is actve */)
+
+// Acknowledges receipt of a ViewMsg_HandleInputEvent message.
+// Payload is a WebInputEvent::Type which is the type of the event, followed
+// by an optional WebInputEvent which is provided only if the event was not
+// processed.
+IPC_MESSAGE_ROUTED0(ViewHostMsg_HandleInputEvent_ACK)
+
+IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
+IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
+
+// Message sent from renderer to the browser when focus changes inside the
+// webpage. The parameter says whether the newly focused element needs
+// keyboard input (true for textfields, text areas and content editable divs).
+IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
+ bool /* is_editable_node */)
+
+// Returns the window location of the given window.
+// TODO(shess): Provide a mapping from reply_msg->routing_id() to
+// HWND so that we can eliminate the NativeViewId parameter.
+IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetWindowRect,
+ gfx::NativeViewId /* window */,
+ gfx::Rect /* Out: Window location */)
+
+IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor,
+ WebCursor)
+
+// Used to set a cookie. The cookie is set asynchronously, but will be
+// available to a subsequent ViewHostMsg_GetCookies request.
+IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie,
+ GURL /* url */,
+ GURL /* first_party_for_cookies */,
+ std::string /* cookie */)
+
+// Used to get cookies for the given URL. This may block waiting for a
+// previous SetCookie message to be processed.
+IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies,
+ GURL /* url */,
+ GURL /* first_party_for_cookies */,
+ std::string /* cookies */)
+
+// Used to get raw cookie information for the given URL. This may block
+// waiting for a previous SetCookie message to be processed.
+IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetRawCookies,
+ GURL /* url */,
+ GURL /* first_party_for_cookies */,
+ std::vector<webkit_glue::WebCookie>
+ /* raw_cookies */)
+
+// Used to delete cookie for the given URL and name
+IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
+ GURL /* url */,
+ std::string /* cookie_name */)
+
+// Used to check if cookies are enabled for the given URL. This may block
+// waiting for a previous SetCookie message to be processed.
+IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_CookiesEnabled,
+ GURL /* url */,
+ GURL /* first_party_for_cookies */,
+ bool /* cookies_enabled */)
+
+// Used to get the list of plugins
+IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
+ bool /* refresh*/,
+ std::vector<webkit::npapi::WebPluginInfo> /* plugins */)
+
+// Return information about a plugin for the given URL and MIME
+// type. If there is no matching plugin, |found| is false. If
+// |enabled| in the WebPluginInfo struct is false, the plug-in is
+// treated as if it was not installed at all.
+//
+// TODO(jam): until we get ContentSetting out of content completely, sending it
+// as int temporarily so we can move these messages to content.
+//
+// If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is
+// blocked by the content settings for |policy_url|. It still
+// appears in navigator.plugins in Javascript though, and can be
+// loaded via click-to-play.
+//
+// If |setting| is set to CONTENT_SETTING_ALLOW, the domain is
+// explicitly white-listed for the plug-in, or the user has chosen
+// not to block nonsandboxed plugins.
+//
+// If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
+// neither blocked nor white-listed, which means that it's allowed
+// by default and can still be blocked if it's non-sandboxed.
+//
+// |actual_mime_type| is the actual mime type supported by the
+// plugin found that match the URL given (one for each item in
+// |info|).
+IPC_SYNC_MESSAGE_CONTROL4_4(ViewHostMsg_GetPluginInfo,
+ int /* routing_id */,
+ GURL /* url */,
+ GURL /* policy_url */,
+ std::string /* mime_type */,
+ bool /* found */,
+ webkit::npapi::WebPluginInfo /* plugin info */,
+ int /* setting */,
+ std::string /* actual_mime_type */)
+
+// A renderer sends this to the browser process when it wants to
+// create a plugin. The browser will create the plugin process if
+// necessary, and will return a handle to the channel on success.
+// On error an empty string is returned.
+IPC_SYNC_MESSAGE_CONTROL3_2(ViewHostMsg_OpenChannelToPlugin,
+ int /* routing_id */,
+ GURL /* url */,
+ std::string /* mime_type */,
+ IPC::ChannelHandle /* channel_handle */,
+ webkit::npapi::WebPluginInfo /* info */)
// A renderer sends this to the browser process when it wants to create a
// worker. The browser will create the worker process if necessary, and
@@ -870,3 +1450,132 @@ IPC_MESSAGE_CONTROL1(ViewHostMsg_ForwardToWorker,
// worker.
IPC_MESSAGE_CONTROL1(ViewHostMsg_CancelCreateDedicatedWorker,
int /* route_id */)
+
+// Tells the browser that a specific Appcache manifest in the current page
+// was accessed.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
+ GURL /* manifest url */,
+ bool /* blocked by policy */)
+
+// Tells the browser that a specific Web database in the current page was
+// accessed.
+IPC_MESSAGE_ROUTED5(ViewHostMsg_WebDatabaseAccessed,
+ GURL /* origin url */,
+ string16 /* database name */,
+ string16 /* database display name */,
+ unsigned long /* estimated size */,
+ bool /* blocked by policy */)
+
+// Initiates a download based on user actions like 'ALT+click'.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_DownloadUrl,
+ GURL /* url */,
+ GURL /* referrer */)
+
+// Used to go to the session history entry at the given offset (ie, -1 will
+// return the "back" item).
+IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
+ int /* offset (from current) of history item to get */)
+
+IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
+ std::wstring /* in - alert message */,
+ std::wstring /* in - default prompt */,
+ GURL /* in - originating page URL */,
+ int /* in - dialog flags */,
+ bool /* out - success */,
+ std::wstring /* out - prompt field */)
+
+// Provides the contents for the given page that was loaded recently.
+IPC_MESSAGE_ROUTED5(ViewHostMsg_PageContents,
+ GURL /* URL of the page */,
+ int32 /* page id */,
+ string16 /* page contents */,
+ std::string /* page ISO639_1 language code */,
+ bool /* whether the page can be translated */)
+
+// Requests that the given URL be opened in the specified manner.
+IPC_MESSAGE_ROUTED3(ViewHostMsg_OpenURL,
+ GURL /* url */,
+ GURL /* referrer */,
+ WindowOpenDisposition /* disposition */)
+
+// Notifies that the preferred size of the content changed.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
+ gfx::Size /* pref_size */)
+
+// A message from HTML-based UI. When (trusted) Javascript calls
+// send(message, args), this message is sent to the browser.
+IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
+ GURL /* source_url */,
+ std::string /* message */,
+ std::string /* args (as a JSON string) */)
+
+// A renderer sends this to the browser process when it wants to
+// create a pepper plugin. The browser will create the plugin process if
+// necessary, and will return a handle to the channel on success.
+// On error an empty string is returned.
+IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_OpenChannelToPepperPlugin,
+ FilePath /* path */,
+ base::ProcessHandle /* plugin_process_handle */,
+ IPC::ChannelHandle /* handle to channel */)
+
+#if defined(USE_X11)
+// A renderer sends this when it needs a browser-side widget for
+// hosting a windowed plugin. id is the XID of the plugin window, for which
+// the container is created.
+IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer,
+ gfx::PluginWindowHandle /* id */)
+
+// Destroy a plugin container previously created using CreatePluginContainer.
+// id is the XID of the plugin window corresponding to the container that is
+// to be destroyed.
+IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer,
+ gfx::PluginWindowHandle /* id */)
+#endif
+
+#if defined(OS_MACOSX)
+// Request that the browser load a font into shared memory for us.
+IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_LoadFont,
+ FontDescriptor /* font to load */,
+ uint32 /* buffer size */,
+ base::SharedMemoryHandle /* font data */)
+#endif
+
+#if defined(OS_WIN)
+// Request that the given font be loaded by the browser so it's cached by the
+// OS. Please see ChildProcessHost::PreCacheFont for details.
+IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_PreCacheFont,
+ LOGFONT /* font data */)
+#endif // defined(OS_WIN)
+
+// Returns WebScreenInfo corresponding to the view.
+// TODO(shess): Provide a mapping from reply_msg->routing_id() to
+// HWND so that we can eliminate the NativeViewId parameter.
+IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetScreenInfo,
+ gfx::NativeViewId /* view */,
+ WebKit::WebScreenInfo /* results */)
+
+// Send the tooltip text for the current mouse position to the browser.
+IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
+ std::wstring /* tooltip text string */,
+ WebKit::WebTextDirection /* text direction hint */)
+
+// Notification that the text selection has changed.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionChanged,
+ std::string /* currently selected text */)
+
+// Asks the browser to display the file chooser. The result is returned in a
+// ViewHost_RunFileChooserResponse message.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
+ ViewHostMsg_RunFileChooser_Params)
+
+// Tells the browser to move the focus to the next (previous if reverse is
+// true) focusable element.
+IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus,
+ bool /* reverse */)
+
+// Returns the window location of the window this widget is embeded.
+// TODO(shess): Provide a mapping from reply_msg->routing_id() to
+// HWND so that we can eliminate the NativeViewId parameter.
+IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect,
+ gfx::NativeViewId /* window */,
+ gfx::Rect /* Out: Window location */)
diff --git a/chrome/common/window_container_type.cc b/content/common/window_container_type.cc
index 519fea3..20ba687 100644
--- a/chrome/common/window_container_type.cc
+++ b/content/common/window_container_type.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/window_container_type.h"
+#include "content/common/window_container_type.h"
#include "base/string_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
diff --git a/chrome/common/window_container_type.h b/content/common/window_container_type.h
index 5db1d0e..761f9a6 100644
--- a/chrome/common/window_container_type.h
+++ b/content/common/window_container_type.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_WINDOW_CONTAINER_TYPE_H_
-#define CHROME_COMMON_WINDOW_CONTAINER_TYPE_H_
+#ifndef CONTENT_COMMON_WINDOW_CONTAINER_TYPE_H_
+#define CONTENT_COMMON_WINDOW_CONTAINER_TYPE_H_
#pragma once
namespace WebKit {
@@ -33,4 +33,4 @@ enum WindowContainerType {
WindowContainerType WindowFeaturesToContainerType(
const WebKit::WebWindowFeatures& window_features);
-#endif // CHROME_COMMON_WINDOW_CONTAINER_TYPE_H_
+#endif // CONTENT_COMMON_WINDOW_CONTAINER_TYPE_H_
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 6b20667e..6f1c8e5 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -187,6 +187,8 @@
'common/webblob_messages.h',
'common/webmessageportchannel_impl.cc',
'common/webmessageportchannel_impl.h',
+ 'common/window_container_type.cc',
+ 'common/window_container_type.h',
'common/worker_messages.h',
],
'conditions': [
diff --git a/content/renderer/load_progress_tracker.cc b/content/renderer/load_progress_tracker.cc
index 5cdeb85..4029db7 100644
--- a/content/renderer/load_progress_tracker.cc
+++ b/content/renderer/load_progress_tracker.cc
@@ -5,7 +5,7 @@
#include "content/renderer/load_progress_tracker.h"
#include "base/message_loop.h"
-#include "chrome/common/render_messages.h"
+#include "content/common/view_messages.h"
#include "content/renderer/render_view.h"
namespace {
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index 730976d..e8446a6 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -38,7 +38,6 @@
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/web_apps.h"
-#include "chrome/common/window_container_type.h"
#include "chrome/renderer/about_handler.h"
#include "chrome/renderer/autofill/autofill_agent.h"
#include "chrome/renderer/autofill/form_manager.h"
@@ -76,7 +75,6 @@
#include "content/common/file_system/file_system_dispatcher.h"
#include "content/common/file_system/webfilesystem_callback_dispatcher.h"
#include "content/common/notification_service.h"
-#include "content/common/page_zoom.h"
#include "content/common/pepper_messages.h"
#include "content/common/renderer_preferences.h"
#include "content/common/view_messages.h"
@@ -915,11 +913,11 @@ WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame,
const WebPluginParams& params) {
webkit::npapi::WebPluginInfo info;
bool found;
- ContentSetting setting;
+ int content_setting;
std::string mime_type;
Send(new ViewHostMsg_GetPluginInfo(
routing_id_, params.url, frame->top()->url(), params.mimeType.utf8(),
- &found, &info, &setting, &mime_type));
+ &found, &info, &content_setting, &mime_type));
if (!found || !webkit::npapi::IsPluginEnabled(info))
return NULL;
@@ -2299,11 +2297,11 @@ bool RenderView::runFileChooser(
return false;
ViewHostMsg_RunFileChooser_Params ipc_params;
if (params.directory)
- ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenFolder;
+ ipc_params.mode = ViewHostMsg_RunFileChooser_Mode::OpenFolder;
else if (params.multiSelect)
- ipc_params.mode = ViewHostMsg_RunFileChooser_Params::OpenMultiple;
+ ipc_params.mode = ViewHostMsg_RunFileChooser_Mode::OpenMultiple;
else
- ipc_params.mode = ViewHostMsg_RunFileChooser_Params::Open;
+ ipc_params.mode = ViewHostMsg_RunFileChooser_Mode::Open;
ipc_params.title = params.title;
ipc_params.default_file_name =
webkit_glue::WebStringToFilePath(params.initialValue);
diff --git a/content/renderer/render_widget_browsertest.cc b/content/renderer/render_widget_browsertest.cc
index a1b46d2..5f32ce1 100644
--- a/content/renderer/render_widget_browsertest.cc
+++ b/content/renderer/render_widget_browsertest.cc
@@ -10,8 +10,7 @@
#include "base/file_util.h"
#include "base/ref_counted_memory.h"
#include "base/stringprintf.h"
-#include "chrome/common/render_messages.h"
-#include "chrome/common/render_messages_params.h"
+#include "content/common/view_messages.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
diff --git a/content/renderer/render_widget_fullscreen.cc b/content/renderer/render_widget_fullscreen.cc
index 1fc5c6d..e32c4d9 100644
--- a/content/renderer/render_widget_fullscreen.cc
+++ b/content/renderer/render_widget_fullscreen.cc
@@ -4,8 +4,8 @@
#include "content/renderer/render_widget_fullscreen.h"
-#include "chrome/common/render_messages.h"
#include "chrome/renderer/render_thread.h"
+#include "content/common/view_messages.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h"
using WebKit::WebWidget;
diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc
index 128129b..fba73ff 100644
--- a/content/renderer/render_widget_fullscreen_pepper.cc
+++ b/content/renderer/render_widget_fullscreen_pepper.cc
@@ -4,11 +4,11 @@
#include "content/renderer/render_widget_fullscreen_pepper.h"
-#include "chrome/common/render_messages.h"
#include "chrome/renderer/render_thread.h"
#include "content/renderer/ggl.h"
#include "content/renderer/gpu_channel_host.h"
#include "content/renderer/pepper_platform_context_3d_impl.h"
+#include "content/common/view_messages.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
diff --git a/content/renderer/renderer_webapplicationcachehost_impl.cc b/content/renderer/renderer_webapplicationcachehost_impl.cc
index 40aff42..c22d4e3 100644
--- a/content/renderer/renderer_webapplicationcachehost_impl.cc
+++ b/content/renderer/renderer_webapplicationcachehost_impl.cc
@@ -5,8 +5,8 @@
#include "content/renderer/renderer_webapplicationcachehost_impl.h"
#include "chrome/common/content_settings_types.h"
-#include "chrome/common/render_messages.h"
#include "chrome/renderer/render_thread.h"
+#include "content/common/view_messages.h"
#include "content/renderer/render_view.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
diff --git a/content/renderer/renderer_webcookiejar_impl.cc b/content/renderer/renderer_webcookiejar_impl.cc
index 4fb1a0a..3bbb551 100644
--- a/content/renderer/renderer_webcookiejar_impl.cc
+++ b/content/renderer/renderer_webcookiejar_impl.cc
@@ -5,7 +5,7 @@
#include "content/renderer/renderer_webcookiejar_impl.h"
#include "base/utf_string_conversions.h"
-#include "chrome/common/render_messages.h"
+#include "content/common/view_messages.h"
#include "chrome/renderer/render_thread.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCookie.h"
#include "webkit/glue/webcookie.h"
diff --git a/content/renderer/renderer_webkitclient_impl.cc b/content/renderer/renderer_webkitclient_impl.cc
index 8150b32..48850d2 100644
--- a/content/renderer/renderer_webkitclient_impl.cc
+++ b/content/renderer/renderer_webkitclient_impl.cc
@@ -18,6 +18,7 @@
#include "content/common/file_system/webfilesystem_impl.h"
#include "content/common/file_utilities_messages.h"
#include "content/common/mime_registry_messages.h"
+#include "content/common/view_messages.h"
#include "content/common/webblobregistry_impl.h"
#include "content/common/webmessageportchannel_impl.h"
#include "content/plugin/npobject_util.h"
diff --git a/content/renderer/web_ui_bindings.cc b/content/renderer/web_ui_bindings.cc
index 4d555da..26d1753 100644
--- a/content/renderer/web_ui_bindings.cc
+++ b/content/renderer/web_ui_bindings.cc
@@ -8,7 +8,7 @@
#include "base/scoped_ptr.h"
#include "base/stl_util-inl.h"
#include "base/values.h"
-#include "chrome/common/render_messages.h"
+#include "content/common/view_messages.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc
index 35b171f8..ad4c1a4 100644
--- a/content/renderer/webplugin_delegate_proxy.cc
+++ b/content/renderer/webplugin_delegate_proxy.cc
@@ -24,6 +24,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/renderer/render_thread.h"
#include "content/common/plugin_messages.h"
+#include "content/common/view_messages.h"
#include "content/plugin/npobject_proxy.h"
#include "content/plugin/npobject_stub.h"
#include "content/plugin/npobject_util.h"
diff --git a/webkit/glue/webaccessibility.cc b/webkit/glue/webaccessibility.cc
index 09a9212..a3d14c4 100644
--- a/webkit/glue/webaccessibility.cc
+++ b/webkit/glue/webaccessibility.cc
@@ -19,6 +19,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNamedNodeMap.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
diff --git a/webkit/glue/webaccessibility.h b/webkit/glue/webaccessibility.h
index 85fe6d2..ea4edce 100644
--- a/webkit/glue/webaccessibility.h
+++ b/webkit/glue/webaccessibility.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/string16.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
+#include "ui/gfx/rect.h"
namespace WebKit {
class WebAccessibilityCache;
@@ -213,7 +213,7 @@ struct WebAccessibility {
string16 value;
Role role;
uint32 state;
- WebKit::WebRect location;
+ gfx::Rect location;
std::map<int32, string16> attributes;
std::vector<WebAccessibility> children;
std::vector<int32> indirect_child_ids;