diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-08 12:07:23 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-08 12:07:23 +0000 |
commit | 3c2fe4e986f41e271c2502dc64b0f47f213b7d58 (patch) | |
tree | 296db6e5b18d33cffd355fe82792cf25c9cbb467 /chrome | |
parent | ec0722e0916a2215fcf9a7859b17214d400d164b (diff) | |
download | chromium_src-3c2fe4e986f41e271c2502dc64b0f47f213b7d58.zip chromium_src-3c2fe4e986f41e271c2502dc64b0f47f213b7d58.tar.gz chromium_src-3c2fe4e986f41e271c2502dc64b0f47f213b7d58.tar.bz2 |
Porting in chrome/ (add 6 files to Linux SCons build)
Review URL: http://codereview.chromium.org/17052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/automation/automation_resource_tracker.h | 2 | ||||
-rw-r--r-- | chrome/browser/browser.scons | 12 | ||||
-rw-r--r-- | chrome/browser/dom_ui/chrome_url_data_manager.cc | 3 | ||||
-rw-r--r-- | chrome/browser/dom_ui/chrome_url_data_manager.h | 1 | ||||
-rw-r--r-- | chrome/browser/provisional_load_details.cc | 6 | ||||
-rw-r--r-- | chrome/browser/renderer_host/download_resource_handler.h | 2 | ||||
-rw-r--r-- | chrome/browser/ssl_manager.h | 1 | ||||
-rw-r--r-- | chrome/test/automation/autocomplete_edit_proxy.h | 35 | ||||
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 57 |
9 files changed, 74 insertions, 45 deletions
diff --git a/chrome/browser/automation/automation_resource_tracker.h b/chrome/browser/automation/automation_resource_tracker.h index 54672fb..66c327a 100644 --- a/chrome/browser/automation/automation_resource_tracker.h +++ b/chrome/browser/automation/automation_resource_tracker.h @@ -28,7 +28,7 @@ struct AutomationResourceTraits<T*> { class AutomationResourceTrackerImpl { public: AutomationResourceTrackerImpl(IPC::Message::Sender* sender) - :sender_(sender), cleared_mappings_(false) {} + : cleared_mappings_(false), sender_(sender) {} virtual ~AutomationResourceTrackerImpl() {} diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index 04e55a4..3cebdb8 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -43,6 +43,7 @@ if not env.Bit('mac'): # TODO: Port to Mac. input_files.extend([ 'autocomplete/keyword_provider.cc', + 'automation/automation_resource_tracker.cc', 'automation/url_request_failed_dns_job.cc', 'automation/url_request_mock_http_job.cc', 'automation/url_request_mock_net_error_job.cc', @@ -52,8 +53,10 @@ if not env.Bit('mac'): 'browser_process.cc', 'browser_trial.cc', 'cancelable_request.cc', + 'chrome_plugin_browsing_context.cc', 'chrome_thread.cc', 'cross_site_request_manager.cc', + 'dom_ui/chrome_url_data_manager.cc', 'download/save_file.cc', 'extensions/extension.cc', 'extensions/extensions_service.cc', @@ -87,6 +90,7 @@ if not env.Bit('mac'): 'meta_table_helper.cc', 'metrics_log.cc', 'metrics_response.cc', + 'net/chrome_url_request_context.cc', 'net/dns_host_info.cc', 'net/referrer.cc', 'net/sdch_dictionary_fetcher.cc', @@ -95,8 +99,10 @@ if not env.Bit('mac'): 'printing/page_range.cc', 'printing/page_setup.cc', 'printing/units.cc', + 'provisional_load_details.cc', 'renderer_host/async_resource_handler.cc', 'renderer_host/buffered_resource_handler.cc', + 'renderer_host/download_resource_handler.cc', 'renderer_host/download_throttling_resource_handler.cc', 'renderer_host/safe_browsing_resource_handler.cc', 'renderer_host/save_file_resource_handler.cc', @@ -141,7 +147,6 @@ if env.Bit('windows'): 'autocomplete/search_provider.cc', 'automation/automation_provider.cc', 'automation/automation_provider_list.cc', - 'automation/automation_resource_tracker.cc', 'automation/ui_controls.cc', 'back_forward_menu_model.cc', 'base_history_model.cc', @@ -169,11 +174,9 @@ if env.Bit('windows'): 'cache_manager_host.cc', 'cert_store.cc', 'character_encoding.cc', - 'chrome_plugin_browsing_context.cc', 'chrome_plugin_host.cc', 'controller.cc', 'dock_info.cc', - 'dom_ui/chrome_url_data_manager.cc', 'dom_ui/dom_ui_contents.cc', 'dom_ui/dom_ui_host.cc', 'dom_ui/dom_ui.cc', @@ -226,7 +229,6 @@ if env.Bit('windows'): 'native_ui_contents.cc', 'navigation_controller.cc', 'navigation_entry.cc', - 'net/chrome_url_request_context.cc', 'net/dns_global.cc', 'net/dns_master.cc', 'net/dns_slave.cc', @@ -249,7 +251,6 @@ if env.Bit('windows'): 'printing/win_printing_context.cc', 'profile.cc', 'profile_manager.cc', - 'provisional_load_details.cc', 'render_process_host.cc', 'render_view_context_menu.cc', 'render_view_context_menu_controller.cc', @@ -258,7 +259,6 @@ if env.Bit('windows'): 'render_widget_helper.cc', 'render_widget_host.cc', 'renderer_host/cross_site_resource_handler.cc', - 'renderer_host/download_resource_handler.cc', 'renderer_host/resource_dispatcher_host.cc', 'repost_form_warning_dialog.cc', 'resource_message_filter.cc', diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc index 940ed68..a180280 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.cc +++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc @@ -30,9 +30,6 @@ static const char kChromeURLScheme[] = "chrome"; // The single global instance of ChromeURLDataManager. ChromeURLDataManager chrome_url_data_manager; -// The ProtocolFactory for creating URLRequestChromeJobs. -static URLRequest::ProtocolFactory Factory; - // URLRequestChromeJob is a URLRequestJob that manages running chrome-internal // resource requests asynchronously. // It hands off URL requests to ChromeURLDataManager, which asynchronously diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.h b/chrome/browser/dom_ui/chrome_url_data_manager.h index 102ab99..224b602 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.h +++ b/chrome/browser/dom_ui/chrome_url_data_manager.h @@ -14,6 +14,7 @@ class GURL; class MessageLoop; class URLRequest; +class URLRequestChromeJob; class URLRequestJob; // To serve dynamic data off of chrome: URLs, implement the diff --git a/chrome/browser/provisional_load_details.cc b/chrome/browser/provisional_load_details.cc index ffc85a0..fcd1558 100644 --- a/chrome/browser/provisional_load_details.cc +++ b/chrome/browser/provisional_load_details.cc @@ -12,10 +12,10 @@ ProvisionalLoadDetails::ProvisionalLoadDetails(bool is_main_frame, const GURL& url, const std::string& security_info, bool is_content_filtered) - : is_main_frame_(is_main_frame), - is_in_page_navigation_(is_in_page_navigation), + : error_code_(net::OK), url_(url), - error_code_(net::OK), + is_main_frame_(is_main_frame), + is_in_page_navigation_(is_in_page_navigation), is_content_filtered_(is_content_filtered) { SSLManager::DeserializeSecurityInfo(security_info, &ssl_cert_id_, diff --git a/chrome/browser/renderer_host/download_resource_handler.h b/chrome/browser/renderer_host/download_resource_handler.h index 52f6c94..b666df6 100644 --- a/chrome/browser/renderer_host/download_resource_handler.h +++ b/chrome/browser/renderer_host/download_resource_handler.h @@ -66,7 +66,7 @@ class DownloadResourceHandler : public ResourceHandler { base::OneShotTimer<DownloadResourceHandler> pause_timer_; static const int kReadBufSize = 32768; // bytes - static const int kLoadsToWrite = 100; // number of data buffers queued + static const size_t kLoadsToWrite = 100; // number of data buffers queued static const int kThrottleTimeMs = 200; // milliseconds DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); diff --git a/chrome/browser/ssl_manager.h b/chrome/browser/ssl_manager.h index 2f08a93..9434a4b 100644 --- a/chrome/browser/ssl_manager.h +++ b/chrome/browser/ssl_manager.h @@ -17,7 +17,6 @@ #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_service.h" #include "chrome/common/render_messages.h" -#include "chrome/views/link.h" #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" #include "net/base/ssl_info.h" diff --git a/chrome/test/automation/autocomplete_edit_proxy.h b/chrome/test/automation/autocomplete_edit_proxy.h index fda27f8..85172d3 100644 --- a/chrome/test/automation/autocomplete_edit_proxy.h +++ b/chrome/test/automation/autocomplete_edit_proxy.h @@ -87,18 +87,29 @@ struct ParamTraits<AutocompleteMatchData> { } static void Log(const param_type& p, std::wstring* l) { - l->append(StringPrintf(L"[%ls %d %ls %ls %d %ls %ls %ls %ls %ls %ls]", - UTF8ToWide(p.provider_name), - p.relevance, - p.deletable ? L"true" : L"false", - p.fill_into_edit, - p.inline_autocomplete_offset, - p.destination_url, - p.contents, - p.description, - p.is_history_what_you_typed_match ? L"true" : L"false", - UTF8ToWide(p.type), - p.starred ? L"true" : L"false")); + l->append(L"["); + l->append(UTF8ToWide(p.provider_name)); + l->append(L" "); + l->append(IntToWString(p.relevance)); + l->append(L" "); + l->append(p.deletable ? L"true" : L"false"); + l->append(L" "); + l->append(p.fill_into_edit); + l->append(L" "); + l->append(IntToWString(p.inline_autocomplete_offset)); + l->append(L" "); + l->append(UTF8ToWide(p.destination_url.spec())); + l->append(L" "); + l->append(p.contents); + l->append(L" "); + l->append(p.description); + l->append(L" "); + l->append(p.is_history_what_you_typed_match ? L"true" : L"false"); + l->append(L" "); + l->append(UTF8ToWide(p.type)); + l->append(L" "); + l->append(p.starred ? L"true" : L"false"); + l->append(L"]"); } }; } // namespace IPC diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index 6ed478c..8005606 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -11,6 +11,7 @@ #include <string> #include <vector> +#include "base/basictypes.h" #include "base/gfx/rect.h" #include "chrome/common/ipc_message_macros.h" #include "chrome/common/navigation_types.h" @@ -147,6 +148,9 @@ IPC_BEGIN_MESSAGES(Automation, 0) bool /* success flag*/, GURL) +#if defined(OS_WIN) + // TODO(port): Port these messages. + // // This message requests the HWND of the top-level window that corresponds // to the given automation handle. // The response contains the HWND value, which is 0 if the call fails. @@ -155,6 +159,15 @@ IPC_BEGIN_MESSAGES(Automation, 0) IPC_MESSAGE_ROUTED1(AutomationMsg_WindowHWNDResponse, HWND /* Win32 handle */) + // This message requests the HWND of the tab that corresponds + // to the given automation handle. + // The response contains the HWND value, which is 0 if the call fails. + IPC_MESSAGE_ROUTED1(AutomationMsg_TabHWNDRequest, + int /* tab_handle */) + IPC_MESSAGE_ROUTED1(AutomationMsg_TabHWNDResponse, + HWND /* win32 Window Handle*/) +#endif // defined(OS_WIN) + // This message notifies the AutomationProxy that a handle that it has // previously been given is now invalid. (For instance, if the handle // represented a window which has now been closed.) The parameter @@ -166,14 +179,6 @@ IPC_BEGIN_MESSAGES(Automation, 0) // associated resource. The parameter value is the handle. IPC_MESSAGE_ROUTED1(AutomationMsg_HandleUnused, int) - // This message requests the HWND of the tab that corresponds - // to the given automation handle. - // The response contains the HWND value, which is 0 if the call fails. - IPC_MESSAGE_ROUTED1(AutomationMsg_TabHWNDRequest, - int /* tab_handle */) - IPC_MESSAGE_ROUTED1(AutomationMsg_TabHWNDResponse, - HWND /* win32 Window Handle*/) - // This message tells the AutomationProvider to provide the given // authentication data to the specified tab, in response to an HTTP/FTP // authentication challenge. @@ -284,6 +289,9 @@ IPC_BEGIN_MESSAGES(Automation, 0) IPC_MESSAGE_ROUTED3(AutomationMsg_WindowViewBoundsRequest, int, int, bool) IPC_MESSAGE_ROUTED2(AutomationMsg_WindowViewBoundsResponse, bool, gfx::Rect) +#if defined(OS_WIN) + // TODO(port): Port these messages. + // // This message requests that a drag be performed in window coordinate space // Request: // int - the handle of the window that's the context for this drag @@ -296,6 +304,7 @@ IPC_BEGIN_MESSAGES(Automation, 0) IPC_MESSAGE_ROUTED4(AutomationMsg_WindowDragRequest, int, std::vector<POINT>, int, bool) IPC_MESSAGE_ROUTED1(AutomationMsg_WindowDragResponse, bool) +#endif // defined(OS_WIN) // Similar to AutomationMsg_InitialLoadsComplete, this indicates that the // new tab ui has completed the initial load of its data. @@ -408,6 +417,9 @@ IPC_BEGIN_MESSAGES(Automation, 0) bool /* success flag */, int /* AutocompleteEdit handle */) +#if defined(OS_WIN) + // TODO(port): Port this message. + // // This message requests that a mouse click be performed in window coordinate // space. // Request: @@ -416,6 +428,7 @@ IPC_BEGIN_MESSAGES(Automation, 0) // int - the flags which identify the mouse button(s) for the click, as // defined in chrome/views/event.h IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClickRequest, int, POINT, int) +#endif // defined(OS_WIN) // This message requests that a key press be performed. // Request: @@ -425,6 +438,9 @@ IPC_BEGIN_MESSAGES(Automation, 0) // associated for, as defined in chrome/views/event.h IPC_MESSAGE_ROUTED3(AutomationMsg_WindowKeyPressRequest, int, wchar_t, int) +#if defined(OS_WIN) + // TODO(port): Port these messages. + // // This message notifies the AutomationProvider to create a tab which is // hosted by an external process. The response contains the HWND of the // window that contains the external tab and the handle to the newly @@ -432,6 +448,7 @@ IPC_BEGIN_MESSAGES(Automation, 0) // The second parameter is the url to be loaded in the new tab. IPC_MESSAGE_ROUTED0(AutomationMsg_CreateExternalTab) IPC_MESSAGE_ROUTED2(AutomationMsg_CreateExternalTabResponse, HWND, int) +#endif // defined(OS_WIN) // This message notifies the AutomationProvider to navigate to a specified // url in the external tab with given handle. The first parameter is the @@ -494,6 +511,9 @@ IPC_BEGIN_MESSAGES(Automation, 0) IPC_MESSAGE_ROUTED1(AutomationMsg_CloseBrowserRequest, int) IPC_MESSAGE_ROUTED2(AutomationMsg_CloseBrowserResponse, bool, bool) +#if defined(OS_WIN) + // TODO(port): Port these messages. + // // This message sets the keyboard accelarators to be used by an externally // hosted tab. This call is not valid on a regular tab hosted within // Chrome. @@ -516,16 +536,6 @@ IPC_BEGIN_MESSAGES(Automation, 0) // host saying whether it processed the accelerator IPC_MESSAGE_ROUTED1(AutomationMsg_HandleAccelerator, MSG) - // This message is an outgoing message from Chrome to an external host. - // It is a request to open a url - // Request: - // -GURL: The URL to open - // -int: The WindowOpenDisposition that specifies where the URL should - // be opened (new tab, new window etc). - // Response: - // None expected - IPC_MESSAGE_ROUTED2(AutomationMsg_OpenURL, GURL, int) - // This message is sent by the container of an externally hosted tab to // reflect any accelerator keys that it did not process. This gives the // tab a chance to handle the keys @@ -535,6 +545,17 @@ IPC_BEGIN_MESSAGES(Automation, 0) // Response: // None expected IPC_MESSAGE_ROUTED2(AutomationMsg_ProcessUnhandledAccelerator, int, MSG) +#endif // defined(OS_WIN) + + // This message is an outgoing message from Chrome to an external host. + // It is a request to open a url + // Request: + // -GURL: The URL to open + // -int: The WindowOpenDisposition that specifies where the URL should + // be opened (new tab, new window etc). + // Response: + // None expected + IPC_MESSAGE_ROUTED2(AutomationMsg_OpenURL, GURL, int) // This message requests the provider to wait until the specified tab has // finished restoring after session restore. |