Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4676)

Unified Diff: chrome/common/automation_messages.h

Issue 5998006: Clean up Automation and Chrome Frame IPC code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/common/automation_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/automation_messages.h
===================================================================
--- chrome/common/automation_messages.h (revision 69966)
+++ chrome/common/automation_messages.h (working copy)
@@ -34,6 +34,167 @@
bool find_next;
};
+struct AutomationURLResponse {
+ AutomationURLResponse();
+ AutomationURLResponse(const std::string& mime_type,
+ const std::string& headers,
+ int64 content_length,
+ const base::Time& last_modified,
+ const std::string& redirect_url,
+ int redirect_status);
+ ~AutomationURLResponse();
+
+ std::string mime_type;
+ std::string headers;
+ int64 content_length;
+ base::Time last_modified;
+ std::string redirect_url;
+ int redirect_status;
+};
+
+struct ExternalTabSettings {
+ ExternalTabSettings();
+ ExternalTabSettings(gfx::NativeWindow parent,
+ const gfx::Rect& dimensions,
+ unsigned int style,
+ bool is_off_the_record,
+ bool load_requests_via_automation,
+ bool handle_top_level_requests,
+ const GURL& initial_url,
+ const GURL& referrer,
+ bool infobars_enabled,
+ bool route_all_top_level_navigations);
+ ~ExternalTabSettings();
+
+ gfx::NativeWindow parent;
+ gfx::Rect dimensions;
+ unsigned int style;
+ bool is_off_the_record;
+ bool load_requests_via_automation;
+ bool handle_top_level_requests;
+ GURL initial_url;
+ GURL referrer;
+ bool infobars_enabled;
+ bool route_all_top_level_navigations;
+};
+
+struct NavigationInfo {
+ NavigationInfo();
+ NavigationInfo(int navigation_type,
+ int relative_offset,
+ int navigation_index,
+ const std::wstring& title,
+ const GURL& url,
+ const GURL& referrer,
+ SecurityStyle security_style,
+ bool displayed_insecure_content,
+ bool ran_insecure_content);
+ ~NavigationInfo();
+
+ int navigation_type;
+ int relative_offset;
+ int navigation_index;
+ std::wstring title;
+ GURL url;
+ GURL referrer;
+ SecurityStyle security_style;
+ bool displayed_insecure_content;
+ bool ran_insecure_content;
+};
+
+// A stripped down version of ContextMenuParams in webkit/glue/context_menu.h.
+struct MiniContextMenuParams {
+ MiniContextMenuParams();
+ MiniContextMenuParams(int screen_x,
+ int screen_y,
+ const GURL& link_url,
+ const GURL& unfiltered_link_url,
+ const GURL& src_url,
+ const GURL& page_url,
+ const GURL& frame_url);
+ ~MiniContextMenuParams();
+
+ // The x coordinate for displaying the menu.
+ int screen_x;
+
+ // The y coordinate for displaying the menu.
+ int screen_y;
+
+ // This is the URL of the link that encloses the node the context menu was
+ // invoked on.
+ GURL link_url;
+
+ // The link URL to be used ONLY for "copy link address". We don't validate
+ // this field in the frontend process.
+ GURL unfiltered_link_url;
+
+ // This is the source URL for the element that the context menu was
+ // invoked on. Example of elements with source URLs are img, audio, and
+ // video.
+ GURL src_url;
+
+ // This is the URL of the top level page that the context menu was invoked
+ // on.
+ GURL page_url;
+
+ // This is the URL of the subframe that the context menu was invoked on.
+ GURL frame_url;
+};
+
+struct AttachExternalTabParams {
+ AttachExternalTabParams();
+ AttachExternalTabParams(uint64 cookie,
+ const GURL& url,
+ const gfx::Rect& dimensions,
+ int disposition,
+ bool user_gesture,
+ const std::string& profile_name);
+ ~AttachExternalTabParams();
+
+ uint64 cookie;
+ GURL url;
+ gfx::Rect dimensions;
+ int disposition;
+ bool user_gesture;
+ std::string profile_name;
+};
+
+#if defined(OS_WIN)
+
+struct Reposition_Params {
+ HWND window;
+ HWND window_insert_after;
+ int left;
+ int top;
+ int width;
+ int height;
+ int flags;
+ bool set_parent;
+ HWND parent_window;
+};
+
+#endif // defined(OS_WIN)
+
+struct AutomationURLRequest {
+ AutomationURLRequest();
+ AutomationURLRequest(const std::string& url,
+ const std::string& method,
+ const std::string& referrer,
+ const std::string& extra_request_headers,
+ scoped_refptr<net::UploadData> upload_data,
+ int resource_type,
+ int load_flags);
+ ~AutomationURLRequest();
+
+ std::string url;
+ std::string method;
+ std::string referrer;
+ std::string extra_request_headers;
+ scoped_refptr<net::UploadData> upload_data;
+ int resource_type; // see webkit/glue/resource_type.h
+ int load_flags; // see net/base/load_flags.h
+};
+
namespace IPC {
template <>
@@ -85,17 +246,6 @@
};
#if defined(OS_WIN)
-struct Reposition_Params {
- HWND window;
- HWND window_insert_after;
- int left;
- int top;
- int width;
- int height;
- int flags;
- bool set_parent;
- HWND parent_window;
-};
// Traits for SetWindowPos_Params structure to pack/unpack.
template <>
@@ -147,26 +297,6 @@
};
#endif // defined(OS_WIN)
-struct AutomationURLRequest {
- AutomationURLRequest();
- AutomationURLRequest(const std::string& url,
- const std::string& method,
- const std::string& referrer,
- const std::string& extra_request_headers,
- scoped_refptr<net::UploadData> upload_data,
- int resource_type,
- int load_flags);
- ~AutomationURLRequest();
-
- std::string url;
- std::string method;
- std::string referrer;
- std::string extra_request_headers;
- scoped_refptr<net::UploadData> upload_data;
- int resource_type; // see webkit/glue/resource_type.h
- int load_flags; // see net/base/load_flags.h
-};
-
// Traits for AutomationURLRequest structure to pack/unpack.
template <>
struct ParamTraits<AutomationURLRequest> {
@@ -176,24 +306,6 @@
static void Log(const param_type& p, std::string* l);
};
-struct AutomationURLResponse {
- AutomationURLResponse();
- AutomationURLResponse(const std::string& mime_type,
- const std::string& headers,
- int64 content_length,
- const base::Time& last_modified,
- const std::string& redirect_url,
- int redirect_status);
- ~AutomationURLResponse();
-
- std::string mime_type;
- std::string headers;
- int64 content_length;
- base::Time last_modified;
- std::string redirect_url;
- int redirect_status;
-};
-
// Traits for AutomationURLResponse structure to pack/unpack.
template <>
struct ParamTraits<AutomationURLResponse> {
@@ -203,32 +315,6 @@
static void Log(const param_type& p, std::string* l);
};
-struct ExternalTabSettings {
- ExternalTabSettings();
- ExternalTabSettings(gfx::NativeWindow parent,
- const gfx::Rect& dimensions,
- unsigned int style,
- bool is_off_the_record,
- bool load_requests_via_automation,
- bool handle_top_level_requests,
- const GURL& initial_url,
- const GURL& referrer,
- bool infobars_enabled,
- bool route_all_top_level_navigations);
- ~ExternalTabSettings();
-
- gfx::NativeWindow parent;
- gfx::Rect dimensions;
- unsigned int style;
- bool is_off_the_record;
- bool load_requests_via_automation;
- bool handle_top_level_requests;
- GURL initial_url;
- GURL referrer;
- bool infobars_enabled;
- bool route_all_top_level_navigations;
-};
-
// Traits for ExternalTabSettings structure to pack/unpack.
template <>
struct ParamTraits<ExternalTabSettings> {
@@ -238,30 +324,6 @@
static void Log(const param_type& p, std::string* l);
};
-struct NavigationInfo {
- NavigationInfo();
- NavigationInfo(int navigation_type,
- int relative_offset,
- int navigation_index,
- const std::wstring& title,
- const GURL& url,
- const GURL& referrer,
- SecurityStyle security_style,
- bool displayed_insecure_content,
- bool ran_insecure_content);
- ~NavigationInfo();
-
- int navigation_type;
- int relative_offset;
- int navigation_index;
- std::wstring title;
- GURL url;
- GURL referrer;
- SecurityStyle security_style;
- bool displayed_insecure_content;
- bool ran_insecure_content;
-};
-
// Traits for NavigationInfo structure to pack/unpack.
template <>
struct ParamTraits<NavigationInfo> {
@@ -271,45 +333,6 @@
static void Log(const param_type& p, std::string* l);
};
-// A stripped down version of ContextMenuParams in webkit/glue/context_menu.h.
-struct MiniContextMenuParams {
- MiniContextMenuParams();
- MiniContextMenuParams(int screen_x,
- int screen_y,
- const GURL& link_url,
- const GURL& unfiltered_link_url,
- const GURL& src_url,
- const GURL& page_url,
- const GURL& frame_url);
- ~MiniContextMenuParams();
-
- // The x coordinate for displaying the menu.
- int screen_x;
-
- // The y coordinate for displaying the menu.
- int screen_y;
-
- // This is the URL of the link that encloses the node the context menu was
- // invoked on.
- GURL link_url;
-
- // The link URL to be used ONLY for "copy link address". We don't validate
- // this field in the frontend process.
- GURL unfiltered_link_url;
-
- // This is the source URL for the element that the context menu was
- // invoked on. Example of elements with source URLs are img, audio, and
- // video.
- GURL src_url;
-
- // This is the URL of the top level page that the context menu was invoked
- // on.
- GURL page_url;
-
- // This is the URL of the subframe that the context menu was invoked on.
- GURL frame_url;
-};
-
// Traits for MiniContextMenuParams structure to pack/unpack.
template <>
struct ParamTraits<MiniContextMenuParams> {
@@ -319,24 +342,6 @@
static void Log(const param_type& p, std::string* l);
};
-struct AttachExternalTabParams {
- AttachExternalTabParams();
- AttachExternalTabParams(uint64 cookie,
- const GURL& url,
- const gfx::Rect& dimensions,
- int disposition,
- bool user_gesture,
- const std::string& profile_name);
- ~AttachExternalTabParams();
-
- uint64 cookie;
- GURL url;
- gfx::Rect dimensions;
- int disposition;
- bool user_gesture;
- std::string profile_name;
-};
-
template <>
struct ParamTraits<AttachExternalTabParams> {
typedef AttachExternalTabParams param_type;
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/common/automation_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698