diff options
80 files changed, 553 insertions, 203 deletions
diff --git a/chrome/browser/automation/ui_controls_internal.cc b/chrome/browser/automation/ui_controls_internal.cc new file mode 100644 index 0000000..25598e8 --- /dev/null +++ b/chrome/browser/automation/ui_controls_internal.cc @@ -0,0 +1,22 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/automation/ui_controls_internal.h" + +namespace ui_controls { + +ClickTask::ClickTask(MouseButton button, int state, Task* followup) + : button_(button), state_(state), followup_(followup) { +} + +ClickTask::~ClickTask() {} + +void ClickTask::Run() { + if (followup_) + SendMouseEventsNotifyWhenDone(button_, state_, followup_); + else + SendMouseEvents(button_, state_); +} + +} // ui_controls diff --git a/chrome/browser/automation/ui_controls_internal.h b/chrome/browser/automation/ui_controls_internal.h index 88631c9..7299b9b 100644 --- a/chrome/browser/automation/ui_controls_internal.h +++ b/chrome/browser/automation/ui_controls_internal.h @@ -16,18 +16,9 @@ class ClickTask : public Task { public: // A |followup| Task can be specified to notify the caller when the mouse // click event is sent. If can be NULL if the caller does not care about it. - ClickTask(MouseButton button, int state, Task* followup) - : button_(button), state_(state), followup_(followup) { - } - - virtual ~ClickTask() {} - - virtual void Run() { - if (followup_) - SendMouseEventsNotifyWhenDone(button_, state_, followup_); - else - SendMouseEvents(button_, state_); - } + ClickTask(MouseButton button, int state, Task* followup); + virtual ~ClickTask(); + virtual void Run(); private: MouseButton button_; diff --git a/chrome/browser/device_orientation/data_fetcher.h b/chrome/browser/device_orientation/data_fetcher.h index 1a599b7..2b57fa9 100644 --- a/chrome/browser/device_orientation/data_fetcher.h +++ b/chrome/browser/device_orientation/data_fetcher.h @@ -13,7 +13,6 @@ class DataFetcher { public: virtual ~DataFetcher() {} virtual bool GetOrientation(Orientation*) = 0; - virtual int MinSamplingIntervalMs() const { return 0; } }; } // namespace device_orientation diff --git a/chrome/browser/device_orientation/provider_impl.cc b/chrome/browser/device_orientation/provider_impl.cc index 5ebfdb6..dfe994a 100644 --- a/chrome/browser/device_orientation/provider_impl.cc +++ b/chrome/browser/device_orientation/provider_impl.cc @@ -189,12 +189,10 @@ int ProviderImpl::SamplingIntervalMs() const { DCHECK(MessageLoop::current() == polling_thread_->message_loop()); DCHECK(data_fetcher_.get()); - int fetcher_interval = data_fetcher_->MinSamplingIntervalMs(); - - if (fetcher_interval > kDesiredSamplingIntervalMs) - return fetcher_interval; - else - return kDesiredSamplingIntervalMs; + // TODO(erg): There used to be unused code here, that called a default + // implementation on the DataFetcherInterface that was never defined. I'm + // removing unused methods from headers. + return kDesiredSamplingIntervalMs; } } // namespace device_orientation diff --git a/chrome/browser/dom_ui/bug_report_ui.cc b/chrome/browser/dom_ui/bug_report_ui.cc index dd25636..545df18 100644 --- a/chrome/browser/dom_ui/bug_report_ui.cc +++ b/chrome/browser/dom_ui/bug_report_ui.cc @@ -30,7 +30,6 @@ #include "chrome/common/jstemplate_builder.h" #include "chrome/common/url_constants.h" #include "gfx/rect.h" -#include "views/window/window.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" @@ -45,6 +44,10 @@ #include "app/win_util.h" #endif +#if defined(TOOLKIT_VIEWS) +#include "views/window/window.h" +#endif + #if defined(OS_CHROMEOS) #include "base/file_util.h" #include "base/path_service.h" diff --git a/chrome/browser/extensions/extension_tts_api.cc b/chrome/browser/extensions/extension_tts_api.cc index 0d18faa..322085f 100644 --- a/chrome/browser/extensions/extension_tts_api.cc +++ b/chrome/browser/extensions/extension_tts_api.cc @@ -18,11 +18,33 @@ const char kCrosLibraryNotLoadedError[] = const int kSpeechCheckDelayIntervalMs = 100; }; +std::string ExtensionTtsPlatformImpl::error() { + return error_; +} + +void ExtensionTtsPlatformImpl::clear_error() { + error_ = std::string(); +} + +void ExtensionTtsPlatformImpl::set_error(const std::string& error) { + error_ = error; +} + // static ExtensionTtsController* ExtensionTtsController::GetInstance() { return Singleton<ExtensionTtsController>::get(); } +ExtensionTtsController::Utterance::Utterance() + : rate(-1.0), + pitch(-1.0), + volume(-1.0), + success_task(NULL), + failure_task(NULL) { +} + +ExtensionTtsController::Utterance::~Utterance() {} + ExtensionTtsController::ExtensionTtsController() : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), current_utterance_(NULL), diff --git a/chrome/browser/extensions/extension_tts_api.h b/chrome/browser/extensions/extension_tts_api.h index 2f99f20..2e4e9bb 100644 --- a/chrome/browser/extensions/extension_tts_api.h +++ b/chrome/browser/extensions/extension_tts_api.h @@ -40,9 +40,9 @@ class ExtensionTtsPlatformImpl { // Return true if the synthesis engine is currently speaking. virtual bool IsSpeaking() = 0; - virtual std::string error() { return error_; } - virtual void clear_error() { error_ = std::string(); } - virtual void set_error(const std::string& error) { error_ = error; } + virtual std::string error(); + virtual void clear_error(); + virtual void set_error(const std::string& error); protected: ExtensionTtsPlatformImpl() {} @@ -60,13 +60,8 @@ class ExtensionTtsController { static ExtensionTtsController* GetInstance(); struct Utterance { - Utterance() - : rate(-1.0), - pitch(-1.0), - volume(-1.0), - success_task(NULL), - failure_task(NULL) { - } + Utterance(); + ~Utterance(); std::string text; std::string language; diff --git a/chrome/browser/gpu_blacklist.cc b/chrome/browser/gpu_blacklist.cc index 6bb33c6..fe246d6 100644 --- a/chrome/browser/gpu_blacklist.cc +++ b/chrome/browser/gpu_blacklist.cc @@ -102,6 +102,8 @@ GpuBlacklist::OsInfo::OsInfo(const std::string& os, } } +GpuBlacklist::OsInfo::~OsInfo() {} + bool GpuBlacklist::OsInfo::Contains(OsType type, const Version& version) const { if (!IsValid()) @@ -214,6 +216,8 @@ GpuBlacklist::GpuBlacklistEntry::GetGpuBlacklistEntryFromValue( return entry; } +GpuBlacklist::GpuBlacklistEntry::~GpuBlacklistEntry() {} + GpuBlacklist::GpuBlacklistEntry::GpuBlacklistEntry() : vendor_id_(0), device_id_(0) { diff --git a/chrome/browser/gpu_blacklist.h b/chrome/browser/gpu_blacklist.h index ee556b3..85c4145 100644 --- a/chrome/browser/gpu_blacklist.h +++ b/chrome/browser/gpu_blacklist.h @@ -116,6 +116,7 @@ class GpuBlacklist { const std::string& version_op, const std::string& version_string, const std::string& version_string2); + ~OsInfo(); // Determines if a given os/version is included in the OsInfo set. bool Contains(OsType type, const Version& version) const; @@ -150,6 +151,8 @@ class GpuBlacklist { // Returns the GpuFeatureFlags. GpuFeatureFlags GetGpuFeatureFlags() const; + ~GpuBlacklistEntry(); + private: GpuBlacklistEntry(); diff --git a/chrome/browser/gtk/first_run_bubble.cc b/chrome/browser/gtk/first_run_bubble.cc index 343f57b..119166b 100644 --- a/chrome/browser/gtk/first_run_bubble.cc +++ b/chrome/browser/gtk/first_run_bubble.cc @@ -48,6 +48,10 @@ void FirstRunBubble::InfoBubbleClosing(InfoBubbleGtk* info_bubble, // TODO(port): Enable parent window } +bool FirstRunBubble::CloseOnEscape() { + return true; +} + void FirstRunBubble::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { diff --git a/chrome/browser/gtk/first_run_bubble.h b/chrome/browser/gtk/first_run_bubble.h index f6f7e8c..220c4f6 100644 --- a/chrome/browser/gtk/first_run_bubble.h +++ b/chrome/browser/gtk/first_run_bubble.h @@ -35,7 +35,7 @@ class FirstRunBubble : public InfoBubbleGtkDelegate, // is about to be closed. virtual void InfoBubbleClosing(InfoBubbleGtk* info_bubble, bool closed_by_escape); - virtual bool CloseOnEscape() { return true; } + virtual bool CloseOnEscape(); // Overridden from NotificationObserver: virtual void Observe(NotificationType type, diff --git a/chrome/browser/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/gtk/notifications/balloon_view_gtk.cc index 6c2cc7e..bbca070 100644 --- a/chrome/browser/gtk/notifications/balloon_view_gtk.cc +++ b/chrome/browser/gtk/notifications/balloon_view_gtk.cc @@ -126,6 +126,10 @@ gfx::Size BalloonViewImpl::GetSize() const { return gfx::Size(GetDesiredTotalWidth(), GetDesiredTotalHeight()); } +BalloonHost* BalloonViewImpl::GetHost() const { + return html_contents_.get(); +} + void BalloonViewImpl::DelayedClose(bool by_user) { html_contents_->Shutdown(); if (frame_container_) { diff --git a/chrome/browser/gtk/notifications/balloon_view_gtk.h b/chrome/browser/gtk/notifications/balloon_view_gtk.h index dce5869..de95e71 100644 --- a/chrome/browser/gtk/notifications/balloon_view_gtk.h +++ b/chrome/browser/gtk/notifications/balloon_view_gtk.h @@ -46,7 +46,7 @@ class BalloonViewImpl : public BalloonView, virtual void RepositionToBalloon(); virtual void Close(bool by_user); virtual gfx::Size GetSize() const; - virtual BalloonHost* GetHost() const { return html_contents_.get(); } + virtual BalloonHost* GetHost() const; private: // NotificationObserver interface. diff --git a/chrome/browser/modal_html_dialog_delegate.cc b/chrome/browser/modal_html_dialog_delegate.cc index 09b4c4a1..b9438cf 100644 --- a/chrome/browser/modal_html_dialog_delegate.cc +++ b/chrome/browser/modal_html_dialog_delegate.cc @@ -69,3 +69,7 @@ void ModalHtmlDialogDelegate::OnDialogClosed(const std::string& json_retval) { // We are done with this request, so delete us. delete this; } + +bool ModalHtmlDialogDelegate::ShouldShowDialogTitle() const { + return true; +} diff --git a/chrome/browser/modal_html_dialog_delegate.h b/chrome/browser/modal_html_dialog_delegate.h index 9336b3b..dbdd812 100644 --- a/chrome/browser/modal_html_dialog_delegate.h +++ b/chrome/browser/modal_html_dialog_delegate.h @@ -47,7 +47,7 @@ class ModalHtmlDialogDelegate virtual std::string GetDialogArgs() const; virtual void OnDialogClosed(const std::string& json_retval); virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } - virtual bool ShouldShowDialogTitle() const { return true; } + virtual bool ShouldShowDialogTitle() const; private: NotificationRegistrar registrar_; diff --git a/chrome/browser/policy/dummy_configuration_policy_provider.cc b/chrome/browser/policy/dummy_configuration_policy_provider.cc new file mode 100644 index 0000000..9a8f491 --- /dev/null +++ b/chrome/browser/policy/dummy_configuration_policy_provider.cc @@ -0,0 +1,22 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/policy/dummy_configuration_policy_provider.h" + +namespace policy { + +DummyConfigurationPolicyProvider::DummyConfigurationPolicyProvider( + const PolicyDefinitionList* policy_list) + : ConfigurationPolicyProvider(policy_list) { +} + +DummyConfigurationPolicyProvider::~DummyConfigurationPolicyProvider() { +} + +bool DummyConfigurationPolicyProvider::Provide( + ConfigurationPolicyStoreInterface* store) { + return true; +} + +} // namespace policy diff --git a/chrome/browser/policy/dummy_configuration_policy_provider.h b/chrome/browser/policy/dummy_configuration_policy_provider.h index 2c519cb..a26ec71 100644 --- a/chrome/browser/policy/dummy_configuration_policy_provider.h +++ b/chrome/browser/policy/dummy_configuration_policy_provider.h @@ -6,22 +6,19 @@ #define CHROME_BROWSER_POLICY_DUMMY_CONFIGURATION_POLICY_PROVIDER_H_ #pragma once -#include "chrome/browser/policy/configuration_policy_store_interface.h" #include "chrome/browser/policy/configuration_policy_provider.h" namespace policy { +class ConfigurationPolicyStoreInterface; + class DummyConfigurationPolicyProvider : public ConfigurationPolicyProvider { public: explicit DummyConfigurationPolicyProvider( - const PolicyDefinitionList* policy_list) - : ConfigurationPolicyProvider(policy_list) { - } - virtual ~DummyConfigurationPolicyProvider() {} - - virtual bool Provide(ConfigurationPolicyStoreInterface* store) { - return true; - } + const PolicyDefinitionList* policy_list); + virtual ~DummyConfigurationPolicyProvider(); + + virtual bool Provide(ConfigurationPolicyStoreInterface* store); private: DISALLOW_COPY_AND_ASSIGN(DummyConfigurationPolicyProvider); diff --git a/chrome/browser/ppapi_plugin_process_host.cc b/chrome/browser/ppapi_plugin_process_host.cc index afd5a80..b9be47a 100644 --- a/chrome/browser/ppapi_plugin_process_host.cc +++ b/chrome/browser/ppapi_plugin_process_host.cc @@ -62,6 +62,10 @@ void PpapiPluginProcessHost::Init(const FilePath& path, cmd_line); } +bool PpapiPluginProcessHost::CanShutdown() { + return true; +} + void PpapiPluginProcessHost::OnProcessLaunched() { } diff --git a/chrome/browser/ppapi_plugin_process_host.h b/chrome/browser/ppapi_plugin_process_host.h index 3981689..23be5da 100644 --- a/chrome/browser/ppapi_plugin_process_host.h +++ b/chrome/browser/ppapi_plugin_process_host.h @@ -20,7 +20,7 @@ class PpapiPluginProcessHost : public BrowserChildProcessHost { void Init(const FilePath& path, IPC::Message* reply_msg); private: - virtual bool CanShutdown() { return true; } + virtual bool CanShutdown(); virtual void OnProcessLaunched(); virtual void OnMessageReceived(const IPC::Message& msg); diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc index 4000e8b..14aac20 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service.cc +++ b/chrome/browser/safe_browsing/client_side_detection_service.cc @@ -32,6 +32,11 @@ const char ClientSideDetectionService::kClientReportPhishingUrl[] = const char ClientSideDetectionService::kClientModelUrl[] = "https://ssl.gstatic.com/safebrowsing/csd/client_model_v0.pb"; +struct ClientSideDetectionService::ClientReportInfo { + scoped_ptr<ClientReportPhishingRequestCallback> callback; + GURL phishing_url; +}; + ClientSideDetectionService::ClientSideDetectionService( const FilePath& model_path, URLRequestContextGetter* request_context_getter) diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h index 9f1ca39..41c87f6 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service.h +++ b/chrome/browser/safe_browsing/client_side_detection_service.h @@ -97,11 +97,6 @@ class ClientSideDetectionService : public URLFetcher::Delegate { ERROR_STATUS, }; - struct ClientReportInfo { - scoped_ptr<ClientReportPhishingRequestCallback> callback; - GURL phishing_url; - }; - static const char kClientReportPhishingUrl[]; static const char kClientModelUrl[]; @@ -177,6 +172,7 @@ class ClientSideDetectionService : public URLFetcher::Delegate { // Map of client report phishing request to the corresponding callback that // has to be invoked when the request is done. + struct ClientReportInfo; std::map<const URLFetcher*, ClientReportInfo*> client_phishing_reports_; // Used to asynchronously call the callbacks for GetModelFile and diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller.cc b/chrome/browser/sync/glue/bookmark_data_type_controller.cc index c8949d0..26a02f4 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller.cc +++ b/chrome/browser/sync/glue/bookmark_data_type_controller.cc @@ -88,6 +88,27 @@ void BookmarkDataTypeController::Stop() { state_ = NOT_RUNNING; } +bool BookmarkDataTypeController::enabled() { + return true; +} + +syncable::ModelType BookmarkDataTypeController::type() { + return syncable::BOOKMARKS; +} + +browser_sync::ModelSafeGroup BookmarkDataTypeController::model_safe_group() { + return browser_sync::GROUP_UI; +} + +const char* BookmarkDataTypeController::name() const { + // For logging only. + return "bookmark"; +} + +DataTypeController::State BookmarkDataTypeController::state() { + return state_; +} + void BookmarkDataTypeController::OnUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message) { // The ProfileSyncService will invoke our Stop() method in response to this. diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller.h b/chrome/browser/sync/glue/bookmark_data_type_controller.h index 41068c8..0716b44 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller.h +++ b/chrome/browser/sync/glue/bookmark_data_type_controller.h @@ -41,26 +41,15 @@ class BookmarkDataTypeController : public DataTypeController, virtual void Stop(); - virtual bool enabled() { - return true; - } - - virtual syncable::ModelType type() { - return syncable::BOOKMARKS; - } - - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_UI; - } - - virtual const char* name() const { - // For logging only. - return "bookmark"; - } - - virtual State state() { - return state_; - } + virtual bool enabled(); + + virtual syncable::ModelType type(); + + virtual browser_sync::ModelSafeGroup model_safe_group(); + + virtual const char* name() const; + + virtual State state(); // UnrecoverableErrorHandler interface. virtual void OnUnrecoverableError(const tracked_objects::Location& from_here, diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc index 119a616..0177e66 100644 --- a/chrome/browser/sync/glue/data_type_manager_impl.cc +++ b/chrome/browser/sync/glue/data_type_manager_impl.cc @@ -340,6 +340,14 @@ void DataTypeManagerImpl::Stop() { FinishStop(); } +const DataTypeController::TypeMap& DataTypeManagerImpl::controllers() { + return controllers_; +} + +DataTypeManager::State DataTypeManagerImpl::state() { + return state_; +} + void DataTypeManagerImpl::FinishStop() { DCHECK(state_== CONFIGURING || state_ == STOPPING || diff --git a/chrome/browser/sync/glue/data_type_manager_impl.h b/chrome/browser/sync/glue/data_type_manager_impl.h index a735394..93d000a 100644 --- a/chrome/browser/sync/glue/data_type_manager_impl.h +++ b/chrome/browser/sync/glue/data_type_manager_impl.h @@ -37,13 +37,9 @@ class DataTypeManagerImpl : public DataTypeManager, virtual void Stop(); - virtual const DataTypeController::TypeMap& controllers() { - return controllers_; - }; + virtual const DataTypeController::TypeMap& controllers(); - virtual State state() { - return state_; - } + virtual State state(); // NotificationObserver implementation. virtual void Observe(NotificationType type, diff --git a/chrome/browser/sync/glue/database_model_worker.cc b/chrome/browser/sync/glue/database_model_worker.cc index 9bc83d5..b09c6c6 100644 --- a/chrome/browser/sync/glue/database_model_worker.cc +++ b/chrome/browser/sync/glue/database_model_worker.cc @@ -34,6 +34,10 @@ void DatabaseModelWorker::CallDoWorkAndSignalTask(Callback0::Type* work, done->Signal(); } +ModelSafeGroup DatabaseModelWorker::GetModelSafeGroup() { + return GROUP_DB; +} + bool DatabaseModelWorker::CurrentThreadIsWorkThread() { return BrowserThread::CurrentlyOn(BrowserThread::DB); } diff --git a/chrome/browser/sync/glue/database_model_worker.h b/chrome/browser/sync/glue/database_model_worker.h index 5b3a6997..6d6a873 100644 --- a/chrome/browser/sync/glue/database_model_worker.h +++ b/chrome/browser/sync/glue/database_model_worker.h @@ -23,7 +23,7 @@ class DatabaseModelWorker : public browser_sync::ModelSafeWorker { // ModelSafeWorker implementation. Called on syncapi SyncerThread. virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); - virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_DB; } + virtual ModelSafeGroup GetModelSafeGroup(); virtual bool CurrentThreadIsWorkThread(); private: diff --git a/chrome/browser/sync/glue/extension_data_type_controller.cc b/chrome/browser/sync/glue/extension_data_type_controller.cc index b31ae4e..0f67690 100644 --- a/chrome/browser/sync/glue/extension_data_type_controller.cc +++ b/chrome/browser/sync/glue/extension_data_type_controller.cc @@ -84,6 +84,27 @@ void ExtensionDataTypeController::Stop() { state_ = NOT_RUNNING; } +bool ExtensionDataTypeController::enabled() { + return true; +} + +syncable::ModelType ExtensionDataTypeController::type() { + return syncable::EXTENSIONS; +} + +browser_sync::ModelSafeGroup ExtensionDataTypeController::model_safe_group() { + return browser_sync::GROUP_UI; +} + +const char* ExtensionDataTypeController::name() const { + // For logging only. + return "extension"; +} + +DataTypeController::State ExtensionDataTypeController::state() { + return state_; +} + void ExtensionDataTypeController::OnUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message) { diff --git a/chrome/browser/sync/glue/extension_data_type_controller.h b/chrome/browser/sync/glue/extension_data_type_controller.h index 61f1d78..0c031df 100644 --- a/chrome/browser/sync/glue/extension_data_type_controller.h +++ b/chrome/browser/sync/glue/extension_data_type_controller.h @@ -34,26 +34,15 @@ class ExtensionDataTypeController : public DataTypeController { virtual void Stop(); - virtual bool enabled() { - return true; - } - - virtual syncable::ModelType type() { - return syncable::EXTENSIONS; - } - - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_UI; - } - - virtual const char* name() const { - // For logging only. - return "extension"; - } - - virtual State state() { - return state_; - } + virtual bool enabled(); + + virtual syncable::ModelType type(); + + virtual browser_sync::ModelSafeGroup model_safe_group(); + + virtual const char* name() const; + + virtual State state(); // UnrecoverableErrorHandler interface. virtual void OnUnrecoverableError( diff --git a/chrome/browser/sync/glue/history_model_worker.cc b/chrome/browser/sync/glue/history_model_worker.cc index bb1ac93..9b0ea509 100644 --- a/chrome/browser/sync/glue/history_model_worker.cc +++ b/chrome/browser/sync/glue/history_model_worker.cc @@ -50,6 +50,10 @@ void HistoryModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { done.Wait(); } +ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() { + return GROUP_HISTORY; +} + bool HistoryModelWorker::CurrentThreadIsWorkThread() { // TODO(ncarter): How to determine this? return true; diff --git a/chrome/browser/sync/glue/history_model_worker.h b/chrome/browser/sync/glue/history_model_worker.h index 32d45dc..bdd0a2c 100644 --- a/chrome/browser/sync/glue/history_model_worker.h +++ b/chrome/browser/sync/glue/history_model_worker.h @@ -31,7 +31,7 @@ class HistoryModelWorker : public browser_sync::ModelSafeWorker, // ModelSafeWorker implementation. Called on syncapi SyncerThread. virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); - virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_HISTORY; } + virtual ModelSafeGroup GetModelSafeGroup(); virtual bool CurrentThreadIsWorkThread(); // CancelableRequestConsumerBase implementation. diff --git a/chrome/browser/sync/glue/password_model_worker.cc b/chrome/browser/sync/glue/password_model_worker.cc index f832ac1..c06f33f 100644 --- a/chrome/browser/sync/glue/password_model_worker.cc +++ b/chrome/browser/sync/glue/password_model_worker.cc @@ -35,6 +35,10 @@ void PasswordModelWorker::CallDoWorkAndSignalTask(Callback0::Type* work, done->Signal(); } +ModelSafeGroup PasswordModelWorker::GetModelSafeGroup() { + return GROUP_PASSWORD; +} + bool PasswordModelWorker::CurrentThreadIsWorkThread() { // TODO(ncarter): How to determine this? return true; diff --git a/chrome/browser/sync/glue/password_model_worker.h b/chrome/browser/sync/glue/password_model_worker.h index d88a456..7ef537a 100644 --- a/chrome/browser/sync/glue/password_model_worker.h +++ b/chrome/browser/sync/glue/password_model_worker.h @@ -30,7 +30,7 @@ class PasswordModelWorker : public browser_sync::ModelSafeWorker { // ModelSafeWorker implementation. Called on syncapi SyncerThread. virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); - virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_PASSWORD; } + virtual ModelSafeGroup GetModelSafeGroup(); virtual bool CurrentThreadIsWorkThread(); private: diff --git a/chrome/browser/sync/glue/preference_data_type_controller.cc b/chrome/browser/sync/glue/preference_data_type_controller.cc index f714ed1..d5c09cf 100644 --- a/chrome/browser/sync/glue/preference_data_type_controller.cc +++ b/chrome/browser/sync/glue/preference_data_type_controller.cc @@ -86,6 +86,27 @@ void PreferenceDataTypeController::Stop() { state_ = NOT_RUNNING; } +bool PreferenceDataTypeController::enabled() { + return true; +} + +syncable::ModelType PreferenceDataTypeController::type() { + return syncable::PREFERENCES; +} + +browser_sync::ModelSafeGroup PreferenceDataTypeController::model_safe_group() { + return browser_sync::GROUP_UI; +} + +const char* PreferenceDataTypeController::name() const { + // For logging only. + return "preference"; +} + +DataTypeController::State PreferenceDataTypeController::state() { + return state_; +} + void PreferenceDataTypeController::OnUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message) { diff --git a/chrome/browser/sync/glue/preference_data_type_controller.h b/chrome/browser/sync/glue/preference_data_type_controller.h index bc2b93d..4fc177d 100644 --- a/chrome/browser/sync/glue/preference_data_type_controller.h +++ b/chrome/browser/sync/glue/preference_data_type_controller.h @@ -29,26 +29,15 @@ class PreferenceDataTypeController : public DataTypeController { virtual void Stop(); - virtual bool enabled() { - return true; - } - - virtual syncable::ModelType type() { - return syncable::PREFERENCES; - } - - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_UI; - } - - virtual const char* name() const { - // For logging only. - return "preference"; - } - - virtual State state() { - return state_; - } + virtual bool enabled(); + + virtual syncable::ModelType type(); + + virtual browser_sync::ModelSafeGroup model_safe_group(); + + virtual const char* name() const; + + virtual State state(); // UnrecoverableErrorHandler interface. virtual void OnUnrecoverableError(const tracked_objects::Location& from_here, diff --git a/chrome/browser/sync/glue/preference_model_associator.cc b/chrome/browser/sync/glue/preference_model_associator.cc index da6ca37..e9fcfdf 100644 --- a/chrome/browser/sync/glue/preference_model_associator.cc +++ b/chrome/browser/sync/glue/preference_model_associator.cc @@ -165,6 +165,17 @@ bool PreferenceModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) { return true; } +const PrefService::Preference* +PreferenceModelAssociator::GetChromeNodeFromSyncId(int64 sync_id) { + return NULL; +} + +bool PreferenceModelAssociator::InitSyncNodeFromChromeId( + const std::string& node_id, + sync_api::BaseNode* sync_node) { + return false; +} + int64 PreferenceModelAssociator::GetSyncIdFromChromeId( const std::string& preference_name) { PreferenceNameToSyncIdMap::const_iterator iter = diff --git a/chrome/browser/sync/glue/preference_model_associator.h b/chrome/browser/sync/glue/preference_model_associator.h index 444c03a..f50bb2c 100644 --- a/chrome/browser/sync/glue/preference_model_associator.h +++ b/chrome/browser/sync/glue/preference_model_associator.h @@ -70,16 +70,11 @@ class PreferenceModelAssociator } // Not implemented. - virtual const PrefService::Preference* GetChromeNodeFromSyncId( - int64 sync_id) { - return NULL; - } + virtual const PrefService::Preference* GetChromeNodeFromSyncId(int64 sync_id); // Not implemented. virtual bool InitSyncNodeFromChromeId(const std::string& node_id, - sync_api::BaseNode* sync_node) { - return false; - } + sync_api::BaseNode* sync_node); // Returns the sync id for the given preference name, or sync_api::kInvalidId // if the preference name is not associated to any sync id. diff --git a/chrome/browser/sync/glue/session_data_type_controller.cc b/chrome/browser/sync/glue/session_data_type_controller.cc index 8b68972..162891c 100644 --- a/chrome/browser/sync/glue/session_data_type_controller.cc +++ b/chrome/browser/sync/glue/session_data_type_controller.cc @@ -82,6 +82,27 @@ void SessionDataTypeController::Stop() { state_ = NOT_RUNNING; } +bool SessionDataTypeController::enabled() { + return true; +} + +syncable::ModelType SessionDataTypeController::type() { + return syncable::SESSIONS; +} + +browser_sync::ModelSafeGroup SessionDataTypeController::model_safe_group() { + return browser_sync::GROUP_UI; +} + +const char* SessionDataTypeController::name() const { + // For logging only. + return "session"; +} + +DataTypeController::State SessionDataTypeController::state() { + return state_; +} + void SessionDataTypeController::OnUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message) { diff --git a/chrome/browser/sync/glue/session_data_type_controller.h b/chrome/browser/sync/glue/session_data_type_controller.h index ae815d4..8736789 100644 --- a/chrome/browser/sync/glue/session_data_type_controller.h +++ b/chrome/browser/sync/glue/session_data_type_controller.h @@ -33,33 +33,22 @@ class SessionDataTypeController : public DataTypeController { virtual void Stop(); - virtual bool enabled() { - return true; - } + virtual bool enabled(); - virtual syncable::ModelType type() { - return syncable::SESSIONS; - } + virtual syncable::ModelType type(); - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_UI; - } + virtual browser_sync::ModelSafeGroup model_safe_group(); - virtual const char* name() const { - // For logging only. - return "session"; - } + virtual const char* name() const; - virtual State state() { - return state_; - } + virtual State state(); // UnrecoverableErrorHandler interface. virtual void OnUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message); -SessionModelAssociator* GetModelAssociator(); + SessionModelAssociator* GetModelAssociator(); private: // Helper method to run the stashed start callback with a given result. diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index 2219523..2a4780f 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -33,7 +33,6 @@ #include "chrome/common/notification_service.h" #include "grit/browser_resources.h" #include "net/base/escape.h" -#include "views/window/window_delegate.h" using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; diff --git a/chrome/browser/tab_contents/render_view_context_menu_gtk.cc b/chrome/browser/tab_contents/render_view_context_menu_gtk.cc index 120ea9e..4c2a6d3 100644 --- a/chrome/browser/tab_contents/render_view_context_menu_gtk.cc +++ b/chrome/browser/tab_contents/render_view_context_menu_gtk.cc @@ -34,6 +34,12 @@ void RenderViewContextMenuGtk::PlatformInit() { } } +bool RenderViewContextMenuGtk::GetAcceleratorForCommandId( + int command_id, + menus::Accelerator* accelerator) { + return false; +} + void RenderViewContextMenuGtk::Popup(const gfx::Point& point) { RenderWidgetHostView* rwhv = source_tab_contents_->GetRenderWidgetHostView(); if (rwhv) diff --git a/chrome/browser/tab_contents/render_view_context_menu_gtk.h b/chrome/browser/tab_contents/render_view_context_menu_gtk.h index 863e21e..f9da630 100644 --- a/chrome/browser/tab_contents/render_view_context_menu_gtk.h +++ b/chrome/browser/tab_contents/render_view_context_menu_gtk.h @@ -35,9 +35,7 @@ class RenderViewContextMenuGtk : public RenderViewContextMenu, // TODO(port): implement. virtual bool GetAcceleratorForCommandId( int command_id, - menus::Accelerator* accelerator) { - return false; - } + menus::Accelerator* accelerator); private: scoped_ptr<MenuGtk> menu_gtk_; diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index 47819e3..40a23b2 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -134,6 +134,22 @@ base::ProcessHandle TaskManagerRendererResource::GetProcess() const { return process_; } +TaskManager::Resource::Type TaskManagerRendererResource::GetType() const { + return RENDERER; +} + +bool TaskManagerRendererResource::ReportsCacheStats() const { + return true; +} + +bool TaskManagerRendererResource::ReportsV8MemoryStats() const { + return true; +} + +bool TaskManagerRendererResource::SupportNetworkUsage() const { + return true; +} + //////////////////////////////////////////////////////////////////////////////// // TaskManagerTabContentsResource class //////////////////////////////////////////////////////////////////////////////// @@ -888,6 +904,19 @@ base::ProcessHandle TaskManagerExtensionProcessResource::GetProcess() const { return process_handle_; } +TaskManager::Resource::Type +TaskManagerExtensionProcessResource::GetType() const { + return EXTENSION; +} + +bool TaskManagerExtensionProcessResource::SupportNetworkUsage() const { + return true; +} + +void TaskManagerExtensionProcessResource::SetSupportNetworkUsage() { + NOTREACHED(); +} + const Extension* TaskManagerExtensionProcessResource::GetExtension() const { return extension_host_->extension(); } @@ -1062,6 +1091,10 @@ TaskManagerNotificationResource::TaskManagerNotificationResource( TaskManagerNotificationResource::~TaskManagerNotificationResource() { } +std::wstring TaskManagerNotificationResource::GetTitle() const { + return title_; +} + SkBitmap TaskManagerNotificationResource::GetIcon() const { return *default_icon_; } @@ -1070,6 +1103,14 @@ base::ProcessHandle TaskManagerNotificationResource::GetProcess() const { return process_handle_; } +TaskManager::Resource::Type TaskManagerNotificationResource::GetType() const { + return NOTIFICATION; +} + +bool TaskManagerNotificationResource::SupportNetworkUsage() const { + return false; +} + //////////////////////////////////////////////////////////////////////////////// // TaskManagerNotificationResourceProvider class //////////////////////////////////////////////////////////////////////////////// @@ -1239,6 +1280,22 @@ base::ProcessHandle TaskManagerBrowserProcessResource::GetProcess() const { return base::GetCurrentProcessHandle(); // process_; } +TaskManager::Resource::Type TaskManagerBrowserProcessResource::GetType() const { + return BROWSER; +} + +bool TaskManagerBrowserProcessResource::SupportNetworkUsage() const { + return true; +} + +void TaskManagerBrowserProcessResource::SetSupportNetworkUsage() { + NOTREACHED(); +} + +bool TaskManagerBrowserProcessResource::ReportsSqliteMemoryUsed() const { + return true; +} + //////////////////////////////////////////////////////////////////////////////// // TaskManagerBrowserProcessResourceProvider class //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/task_manager/task_manager_resource_providers.h b/chrome/browser/task_manager/task_manager_resource_providers.h index cf29bc2..b43a2d3 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.h +++ b/chrome/browser/task_manager/task_manager_resource_providers.h @@ -36,15 +36,15 @@ class TaskManagerRendererResource : public TaskManager::Resource { // TaskManager::Resource methods: virtual base::ProcessHandle GetProcess() const; - virtual Type GetType() const { return RENDERER; } - virtual bool ReportsCacheStats() const { return true; } + virtual Type GetType() const; + virtual bool ReportsCacheStats() const; virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const; - virtual bool ReportsV8MemoryStats() const { return true; } + virtual bool ReportsV8MemoryStats() const; virtual size_t GetV8MemoryAllocated() const; virtual size_t GetV8MemoryUsed() const; // RenderResources always provide the network usage. - virtual bool SupportNetworkUsage() const { return true; } + virtual bool SupportNetworkUsage() const; virtual void SetSupportNetworkUsage() { } virtual void Refresh(); @@ -298,9 +298,9 @@ class TaskManagerExtensionProcessResource : public TaskManager::Resource { virtual std::wstring GetTitle() const; virtual SkBitmap GetIcon() const; virtual base::ProcessHandle GetProcess() const; - virtual Type GetType() const { return EXTENSION; } - virtual bool SupportNetworkUsage() const { return true; } - virtual void SetSupportNetworkUsage() { NOTREACHED(); } + virtual Type GetType() const; + virtual bool SupportNetworkUsage() const; + virtual void SetSupportNetworkUsage(); virtual const Extension* GetExtension() const; // Returns the pid of the extension process. @@ -370,11 +370,11 @@ class TaskManagerNotificationResource : public TaskManager::Resource { virtual ~TaskManagerNotificationResource(); // TaskManager::Resource interface - virtual std::wstring GetTitle() const { return title_; } + virtual std::wstring GetTitle() const; virtual SkBitmap GetIcon() const; virtual base::ProcessHandle GetProcess() const; - virtual Type GetType() const { return NOTIFICATION; } - virtual bool SupportNetworkUsage() const { return false; } + virtual Type GetType() const; + virtual bool SupportNetworkUsage() const; virtual void SetSupportNetworkUsage() { } private: @@ -438,12 +438,12 @@ class TaskManagerBrowserProcessResource : public TaskManager::Resource { virtual std::wstring GetTitle() const; virtual SkBitmap GetIcon() const; virtual base::ProcessHandle GetProcess() const; - virtual Type GetType() const { return BROWSER; } + virtual Type GetType() const; - virtual bool SupportNetworkUsage() const { return true; } - virtual void SetSupportNetworkUsage() { NOTREACHED(); } + virtual bool SupportNetworkUsage() const; + virtual void SetSupportNetworkUsage(); - virtual bool ReportsSqliteMemoryUsed() const { return true; } + virtual bool ReportsSqliteMemoryUsed() const; virtual size_t SqliteMemoryUsedBytes() const; // Returns the pid of the browser process. diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc index c4c8a7e..034e0a0 100644 --- a/chrome/browser/ui/views/notifications/balloon_view.cc +++ b/chrome/browser/ui/views/notifications/balloon_view.cc @@ -131,6 +131,10 @@ gfx::Size BalloonViewImpl::GetSize() const { return gfx::Size(GetTotalWidth(), GetTotalHeight()); } +BalloonHost* BalloonViewImpl::GetHost() const { + return html_contents_.get(); +} + void BalloonViewImpl::RunMenu(views::View* source, const gfx::Point& pt) { RunOptionsMenu(pt); } @@ -166,6 +170,10 @@ void BalloonViewImpl::DidChangeBounds(const gfx::Rect& previous, SizeContentsWindow(); } +gfx::Size BalloonViewImpl::GetPreferredSize() { + return gfx::Size(1000, 1000); +} + void BalloonViewImpl::SizeContentsWindow() { if (!html_container_ || !frame_container_) return; diff --git a/chrome/browser/ui/views/notifications/balloon_view.h b/chrome/browser/ui/views/notifications/balloon_view.h index 9bcea0e..c069a0a 100644 --- a/chrome/browser/ui/views/notifications/balloon_view.h +++ b/chrome/browser/ui/views/notifications/balloon_view.h @@ -59,16 +59,14 @@ class BalloonViewImpl : public BalloonView, virtual void RepositionToBalloon(); virtual void Close(bool by_user); virtual gfx::Size GetSize() const; - virtual BalloonHost* GetHost() const { return html_contents_.get(); } + virtual BalloonHost* GetHost() const; private: // views::View interface. virtual void Paint(gfx::Canvas* canvas); virtual void DidChangeBounds(const gfx::Rect& previous, const gfx::Rect& current); - virtual gfx::Size GetPreferredSize() { - return gfx::Size(1000, 1000); - } + virtual gfx::Size GetPreferredSize(); // views::ViewMenuDelegate interface. virtual void RunMenu(views::View* source, const gfx::Point& pt); diff --git a/chrome/browser/ui/views/notifications/balloon_view_host.cc b/chrome/browser/ui/views/notifications/balloon_view_host.cc index 24a7fe2..ddc59c8 100644 --- a/chrome/browser/ui/views/notifications/balloon_view_host.cc +++ b/chrome/browser/ui/views/notifications/balloon_view_host.cc @@ -90,3 +90,7 @@ void BalloonViewHost::InitRenderWidgetHostView() { NOTIMPLEMENTED(); #endif } + +RenderWidgetHostView* BalloonViewHost::render_widget_host_view() const { + return render_widget_host_view_; +} diff --git a/chrome/browser/ui/views/notifications/balloon_view_host.h b/chrome/browser/ui/views/notifications/balloon_view_host.h index a2f6663..23f82b9 100644 --- a/chrome/browser/ui/views/notifications/balloon_view_host.h +++ b/chrome/browser/ui/views/notifications/balloon_view_host.h @@ -39,9 +39,7 @@ class BalloonViewHost : public BalloonHost { protected: virtual void InitRenderWidgetHostView(); - virtual RenderWidgetHostView* render_widget_host_view() const { - return render_widget_host_view_; - } + virtual RenderWidgetHostView* render_widget_host_view() const; private: // The platform-specific widget host view. Pointer is owned by the RVH. diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 7be9513..ca20862 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -262,6 +262,7 @@ 'browser/automation/testing_automation_provider.h', 'browser/automation/url_request_automation_job.cc', 'browser/automation/url_request_automation_job.h', + 'browser/automation/ui_controls_internal.cc', 'browser/automation/ui_controls_internal.h', 'browser/automation/ui_controls_linux.cc', 'browser/automation/ui_controls_mac.mm', @@ -1993,6 +1994,7 @@ 'browser/policy/device_management_policy_provider.h', 'browser/policy/device_token_fetcher.cc', 'browser/policy/device_token_fetcher.h', + 'browser/policy/dummy_configuration_policy_provider.cc', 'browser/policy/dummy_configuration_policy_provider.h', 'browser/policy/file_based_policy_loader.cc', 'browser/policy/file_based_policy_loader.h', diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index 8ad6da3..f590c73 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -206,6 +206,7 @@ # TODO(noelutz): Find a better way to include these files '<(protoc_out_dir)/chrome/renderer/safe_browsing/client_model.pb.cc', '<(protoc_out_dir)/chrome/renderer/safe_browsing/client_model.pb.h', + 'renderer/safe_browsing/feature_extractor_clock.cc', 'renderer/safe_browsing/feature_extractor_clock.h', 'renderer/safe_browsing/features.cc', 'renderer/safe_browsing/features.h', diff --git a/chrome/renderer/devtools_agent_filter.cc b/chrome/renderer/devtools_agent_filter.cc index 012eb84..f5e1502 100644 --- a/chrome/renderer/devtools_agent_filter.cc +++ b/chrome/renderer/devtools_agent_filter.cc @@ -75,6 +75,10 @@ bool DevToolsAgentFilter::OnMessageReceived(const IPC::Message& message) { return message_handled_; } +void DevToolsAgentFilter::OnFilterAdded(IPC::Channel* channel) { + channel_ = channel; +} + void DevToolsAgentFilter::OnDebuggerCommand(const std::string& command) { WebDevToolsAgent::executeDebuggerCommand( WebString::fromUTF8(command), current_routing_id_); diff --git a/chrome/renderer/devtools_agent_filter.h b/chrome/renderer/devtools_agent_filter.h index b5012d4..a02443a 100644 --- a/chrome/renderer/devtools_agent_filter.h +++ b/chrome/renderer/devtools_agent_filter.h @@ -30,7 +30,7 @@ class DevToolsAgentFilter : public IPC::ChannelProxy::MessageFilter { // IPC::ChannelProxy::MessageFilter override. Called on IO thread. virtual bool OnMessageReceived(const IPC::Message& message); - virtual void OnFilterAdded(IPC::Channel* channel) { channel_ = channel; } + virtual void OnFilterAdded(IPC::Channel* channel); static void DispatchMessageLoop(); diff --git a/chrome/renderer/media/ipc_video_decoder.cc b/chrome/renderer/media/ipc_video_decoder.cc index 12b262a..d6ff898 100644 --- a/chrome/renderer/media/ipc_video_decoder.cc +++ b/chrome/renderer/media/ipc_video_decoder.cc @@ -76,6 +76,10 @@ void IpcVideoDecoder::Initialize(media::DemuxerStream* demuxer_stream, decode_context_.get(), param); } +const media::MediaFormat& IpcVideoDecoder::media_format() { + return media_format_; +} + void IpcVideoDecoder::Stop(media::FilterCallback* callback) { stop_callback_.reset(callback); decode_engine_->Uninitialize(); @@ -175,6 +179,10 @@ void IpcVideoDecoder::ProduceVideoFrame( decode_engine_->ProduceVideoFrame(video_frame); } +bool IpcVideoDecoder::ProvidesBuffer() { + return true; +} + // This method is called by VideoDecodeEngine that a video frame is produced. // This is then passed to VideoRenderer. void IpcVideoDecoder::ConsumeVideoFrame( diff --git a/chrome/renderer/media/ipc_video_decoder.h b/chrome/renderer/media/ipc_video_decoder.h index afe5685..87596c6 100644 --- a/chrome/renderer/media/ipc_video_decoder.h +++ b/chrome/renderer/media/ipc_video_decoder.h @@ -33,11 +33,11 @@ class IpcVideoDecoder : public media::VideoDecoder, // media::VideoDecoder implementation. virtual void Initialize(media::DemuxerStream* demuxer_stream, media::FilterCallback* callback); - virtual const media::MediaFormat& media_format() { return media_format_; } + virtual const media::MediaFormat& media_format(); virtual void ProduceVideoFrame(scoped_refptr<media::VideoFrame> video_frame); // TODO(hclam): Remove this method. - virtual bool ProvidesBuffer() { return true; } + virtual bool ProvidesBuffer(); // media::VideoDecodeEngine::EventHandler implementation. virtual void OnInitializeComplete(const media::VideoCodecInfo& info); diff --git a/chrome/renderer/safe_browsing/feature_extractor_clock.cc b/chrome/renderer/safe_browsing/feature_extractor_clock.cc new file mode 100644 index 0000000..45fbd4d --- /dev/null +++ b/chrome/renderer/safe_browsing/feature_extractor_clock.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/renderer/safe_browsing/feature_extractor_clock.h" + +namespace safe_browsing { + +FeatureExtractorClock::~FeatureExtractorClock() {} + +base::TimeTicks FeatureExtractorClock::Now() { + return base::TimeTicks::Now(); +} + +} // namespace safe_browsing diff --git a/chrome/renderer/safe_browsing/feature_extractor_clock.h b/chrome/renderer/safe_browsing/feature_extractor_clock.h index 0f5cd37..54bff06 100644 --- a/chrome/renderer/safe_browsing/feature_extractor_clock.h +++ b/chrome/renderer/safe_browsing/feature_extractor_clock.h @@ -15,10 +15,10 @@ namespace safe_browsing { class FeatureExtractorClock { public: FeatureExtractorClock() {} - virtual ~FeatureExtractorClock() {} + virtual ~FeatureExtractorClock(); // Returns the current time. May be mocked for testing. - virtual base::TimeTicks Now() { return base::TimeTicks::Now(); } + virtual base::TimeTicks Now(); private: DISALLOW_COPY_AND_ASSIGN(FeatureExtractorClock); diff --git a/chrome/service/cloud_print/printer_job_handler.cc b/chrome/service/cloud_print/printer_job_handler.cc index 8448536..5c772ef 100644 --- a/chrome/service/cloud_print/printer_job_handler.cc +++ b/chrome/service/cloud_print/printer_job_handler.cc @@ -17,6 +17,19 @@ #include "googleurl/src/gurl.h" #include "net/http/http_response_headers.h" +PrinterJobHandler::JobDetails::JobDetails() {} + +PrinterJobHandler::JobDetails::~JobDetails() {} + +void PrinterJobHandler::JobDetails::Clear() { + job_id_.clear(); + job_title_.clear(); + print_ticket_.clear(); + print_data_mime_type_.clear(); + print_data_file_path_ = FilePath(); + tags_.clear(); +} + PrinterJobHandler::PrinterJobHandler( const printing::PrinterBasicInfo& printer_info, const PrinterInfoFromCloud& printer_info_cloud, diff --git a/chrome/service/cloud_print/printer_job_handler.h b/chrome/service/cloud_print/printer_job_handler.h index 4a55fb0..9ffc887 100644 --- a/chrome/service/cloud_print/printer_job_handler.h +++ b/chrome/service/cloud_print/printer_job_handler.h @@ -73,20 +73,16 @@ class PrinterJobHandler : public base::RefCountedThreadSafe<PrinterJobHandler>, PRINT_FAILED, }; struct JobDetails { + JobDetails(); + ~JobDetails(); + void Clear(); + std::string job_id_; std::string job_title_; std::string print_ticket_; FilePath print_data_file_path_; std::string print_data_mime_type_; std::vector<std::string> tags_; - void Clear() { - job_id_.clear(); - job_title_.clear(); - print_ticket_.clear(); - print_data_mime_type_.clear(); - print_data_file_path_ = FilePath(); - tags_.clear(); - } }; public: diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index 79047e1..17c3b78d 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -6478,6 +6478,10 @@ class CapturingProxyResolver : public ProxyResolver { NOTREACHED(); } + virtual void CancelSetPacScript() { + NOTREACHED(); + } + virtual int SetPacScript(const scoped_refptr<ProxyResolverScriptData>&, CompletionCallback* /*callback*/) { return OK; diff --git a/net/net.gyp b/net/net.gyp index 7be250c..1e1175a 100644 --- a/net/net.gyp +++ b/net/net.gyp @@ -541,6 +541,7 @@ 'proxy/proxy_config.cc', 'proxy/proxy_config.h', 'proxy/proxy_config_service.h', + 'proxy/proxy_config_service_fixed.cc', 'proxy/proxy_config_service_fixed.h', 'proxy/proxy_config_service_linux.cc', 'proxy/proxy_config_service_linux.h', diff --git a/net/proxy/init_proxy_resolver_unittest.cc b/net/proxy/init_proxy_resolver_unittest.cc index f9858614..c1a69d1 100644 --- a/net/proxy/init_proxy_resolver_unittest.cc +++ b/net/proxy/init_proxy_resolver_unittest.cc @@ -107,6 +107,8 @@ class RuleBasedProxyScriptFetcher : public ProxyScriptFetcher { virtual void Cancel() {} + virtual URLRequestContext* GetRequestContext() { return NULL; } + private: const Rules* rules_; }; @@ -130,6 +132,10 @@ class RuleBasedProxyResolver : public ProxyResolver { NOTREACHED(); } + virtual void CancelSetPacScript() { + NOTREACHED(); + } + virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& script_data, CompletionCallback* callback) { diff --git a/net/proxy/multi_threaded_proxy_resolver_unittest.cc b/net/proxy/multi_threaded_proxy_resolver_unittest.cc index 6f168a7..a18804f 100644 --- a/net/proxy/multi_threaded_proxy_resolver_unittest.cc +++ b/net/proxy/multi_threaded_proxy_resolver_unittest.cc @@ -60,6 +60,10 @@ class MockProxyResolver : public ProxyResolver { NOTREACHED(); } + virtual void CancelSetPacScript() { + NOTREACHED(); + } + virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& script_data, CompletionCallback* callback) { @@ -169,6 +173,10 @@ class ForwardingProxyResolver : public ProxyResolver { impl_->CancelRequest(request); } + virtual void CancelSetPacScript() { + impl_->CancelSetPacScript(); + } + virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& script_data, CompletionCallback* callback) { diff --git a/net/proxy/proxy_config_service_fixed.cc b/net/proxy/proxy_config_service_fixed.cc new file mode 100644 index 0000000..b23c265 --- /dev/null +++ b/net/proxy/proxy_config_service_fixed.cc @@ -0,0 +1,20 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "net/proxy/proxy_config_service_fixed.h" + +namespace net { + +ProxyConfigServiceFixed::ProxyConfigServiceFixed(const ProxyConfig& pc) + : pc_(pc) { +} + +ProxyConfigServiceFixed::~ProxyConfigServiceFixed() {} + +bool ProxyConfigServiceFixed::GetLatestProxyConfig(ProxyConfig* config) { + *config = pc_; + return true; +} + +} // namespace net diff --git a/net/proxy/proxy_config_service_fixed.h b/net/proxy/proxy_config_service_fixed.h index e9eac8e..b0d8f03 100644 --- a/net/proxy/proxy_config_service_fixed.h +++ b/net/proxy/proxy_config_service_fixed.h @@ -15,15 +15,13 @@ namespace net { // Implementation of ProxyConfigService that returns a fixed result. class ProxyConfigServiceFixed : public ProxyConfigService { public: - explicit ProxyConfigServiceFixed(const ProxyConfig& pc) : pc_(pc) {} + explicit ProxyConfigServiceFixed(const ProxyConfig& pc); + virtual ~ProxyConfigServiceFixed(); // ProxyConfigService methods: virtual void AddObserver(Observer* observer) {} virtual void RemoveObserver(Observer* observer) {} - virtual bool GetLatestProxyConfig(ProxyConfig* config) { - *config = pc_; - return true; - } + virtual bool GetLatestProxyConfig(ProxyConfig* config); private: ProxyConfig pc_; diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h index 9220f5e..fcc2395 100644 --- a/net/proxy/proxy_resolver.h +++ b/net/proxy/proxy_resolver.h @@ -54,10 +54,7 @@ class ProxyResolver { // contain the actual script bytes rather than just the URL. bool expects_pac_bytes() const { return expects_pac_bytes_; } - // TODO(eroman): Make this =0. - virtual void CancelSetPacScript() { - NOTREACHED(); - } + virtual void CancelSetPacScript() = 0; // Frees any unneeded memory held by the resolver, e.g. garbage in the JS // engine. Most subclasses don't need to do anything, so we provide a default diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc index 442715d..128450f 100644 --- a/net/proxy/proxy_resolver_mac.cc +++ b/net/proxy/proxy_resolver_mac.cc @@ -53,6 +53,12 @@ void ResultCallback(void* client, CFArrayRef proxies, CFErrorRef error) { namespace net { +ProxyResolverMac::ProxyResolverMac() + : ProxyResolver(false /*expects_pac_bytes*/) { +} + +ProxyResolverMac::~ProxyResolverMac() {} + // Gets the proxy information for a query URL from a PAC. Implementation // inspired by http://developer.apple.com/samplecode/CFProxySupportTool/ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, @@ -171,4 +177,19 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, return OK; } +void ProxyResolverMac::CancelRequest(RequestHandle request) { + NOTREACHED(); +} + +void ProxyResolverMac::CancelSetPacScript() { + NOTREACHED(); +} + +int ProxyResolverMac::SetPacScript( + const scoped_refptr<ProxyResolverScriptData>& script_data, + CompletionCallback* /*callback*/) { + script_data_ = script_data; + return OK; +} + } // namespace net diff --git a/net/proxy/proxy_resolver_mac.h b/net/proxy/proxy_resolver_mac.h index 950b11f..fe6e791 100644 --- a/net/proxy/proxy_resolver_mac.h +++ b/net/proxy/proxy_resolver_mac.h @@ -16,7 +16,8 @@ namespace net { // proxies. class ProxyResolverMac : public ProxyResolver { public: - ProxyResolverMac() : ProxyResolver(false /*expects_pac_bytes*/) {} + ProxyResolverMac(); + virtual ~ProxyResolverMac(); // ProxyResolver methods: virtual int GetProxyForURL(const GURL& url, @@ -25,16 +26,13 @@ class ProxyResolverMac : public ProxyResolver { RequestHandle* request, const BoundNetLog& net_log); - virtual void CancelRequest(RequestHandle request) { - NOTREACHED(); - } + virtual void CancelRequest(RequestHandle request); + + virtual void CancelSetPacScript(); virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& script_data, - CompletionCallback* /*callback*/) { - script_data_ = script_data; - return OK; - } + CompletionCallback* /*callback*/); private: scoped_refptr<ProxyResolverScriptData> script_data_; diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc index 2bf3b6d..80a1937 100644 --- a/net/proxy/proxy_resolver_v8.cc +++ b/net/proxy/proxy_resolver_v8.cc @@ -721,6 +721,10 @@ void ProxyResolverV8::CancelRequest(RequestHandle request) { NOTREACHED(); } +void ProxyResolverV8::CancelSetPacScript() { + NOTREACHED(); +} + void ProxyResolverV8::PurgeMemory() { context_->PurgeMemory(); } diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h index 7345f45..28bdcd0 100644 --- a/net/proxy/proxy_resolver_v8.h +++ b/net/proxy/proxy_resolver_v8.h @@ -47,6 +47,7 @@ class ProxyResolverV8 : public ProxyResolver { RequestHandle* /*request*/, const BoundNetLog& net_log); virtual void CancelRequest(RequestHandle request); + virtual void CancelSetPacScript(); virtual void PurgeMemory(); virtual void Shutdown(); virtual int SetPacScript( diff --git a/net/proxy/proxy_resolver_winhttp.cc b/net/proxy/proxy_resolver_winhttp.cc index 6fd057d..13f5fb5 100644 --- a/net/proxy/proxy_resolver_winhttp.cc +++ b/net/proxy/proxy_resolver_winhttp.cc @@ -124,6 +124,10 @@ void ProxyResolverWinHttp::CancelRequest(RequestHandle request) { NOTREACHED(); } +void ProxyResolverWinHttp::CancelSetPacScript() { + NOTREACHED(); +} + int ProxyResolverWinHttp::SetPacScript( const scoped_refptr<ProxyResolverScriptData>& script_data, CompletionCallback* /*callback*/) { diff --git a/net/proxy/proxy_resolver_winhttp.h b/net/proxy/proxy_resolver_winhttp.h index 68d1109..9784672 100644 --- a/net/proxy/proxy_resolver_winhttp.h +++ b/net/proxy/proxy_resolver_winhttp.h @@ -27,6 +27,9 @@ class ProxyResolverWinHttp : public ProxyResolver { RequestHandle* /*request*/, const BoundNetLog& /*net_log*/); virtual void CancelRequest(RequestHandle request); + + virtual void CancelSetPacScript(); + virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& script_data, CompletionCallback* /*callback*/); diff --git a/net/proxy/proxy_script_fetcher.h b/net/proxy/proxy_script_fetcher.h index 0a28065..bf33bcb 100644 --- a/net/proxy/proxy_script_fetcher.h +++ b/net/proxy/proxy_script_fetcher.h @@ -48,7 +48,7 @@ class ProxyScriptFetcher { // Returns the request context that this fetcher uses to issue downloads, // or NULL. - virtual URLRequestContext* GetRequestContext() { return NULL; } + virtual URLRequestContext* GetRequestContext() = 0; }; } // namespace net diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc index 669ae083..f321ef03 100644 --- a/net/proxy/proxy_service.cc +++ b/net/proxy/proxy_service.cc @@ -113,6 +113,10 @@ class ProxyResolverNull : public ProxyResolver { NOTREACHED(); } + virtual void CancelSetPacScript() { + NOTREACHED(); + } + virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& /*script_data*/, CompletionCallback* /*callback*/) { @@ -141,6 +145,10 @@ class ProxyResolverFromPacString : public ProxyResolver { NOTREACHED(); } + virtual void CancelSetPacScript() { + NOTREACHED(); + } + virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& pac_script, CompletionCallback* callback) { diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc index 3c8ef2a..7dec769 100644 --- a/net/proxy/proxy_service_unittest.cc +++ b/net/proxy/proxy_service_unittest.cc @@ -98,6 +98,8 @@ class MockProxyScriptFetcher : public ProxyScriptFetcher { virtual void Cancel() {} + virtual URLRequestContext* GetRequestContext() { return NULL; } + const GURL& pending_request_url() const { return pending_request_url_; } diff --git a/net/proxy/sync_host_resolver_bridge_unittest.cc b/net/proxy/sync_host_resolver_bridge_unittest.cc index cd4264e..43c829f 100644 --- a/net/proxy/sync_host_resolver_bridge_unittest.cc +++ b/net/proxy/sync_host_resolver_bridge_unittest.cc @@ -109,6 +109,10 @@ class SyncProxyResolver : public ProxyResolver { host_resolver_->Shutdown(); } + virtual void CancelSetPacScript() { + NOTREACHED(); + } + virtual int SetPacScript( const scoped_refptr<ProxyResolverScriptData>& script_data, CompletionCallback* callback) { diff --git a/webkit/glue/plugins/webplugin_file_delegate.cc b/webkit/glue/plugins/webplugin_file_delegate.cc new file mode 100644 index 0000000..68c4c60 --- /dev/null +++ b/webkit/glue/plugins/webplugin_file_delegate.cc @@ -0,0 +1,17 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "webkit/glue/plugins/webplugin_file_delegate.h" + +namespace webkit_glue { + +bool WebPluginFileDelegate::ChooseFile(const char* mime_types, + int mode, + NPChooseFileCallback callback, + void* user_data) { + return false; +} + +} // namespace webkit_glue + diff --git a/webkit/glue/plugins/webplugin_file_delegate.h b/webkit/glue/plugins/webplugin_file_delegate.h index 162516c..ad2bba0 100644 --- a/webkit/glue/plugins/webplugin_file_delegate.h +++ b/webkit/glue/plugins/webplugin_file_delegate.h @@ -21,9 +21,7 @@ class WebPluginFileDelegate { virtual bool ChooseFile(const char* mime_types, int mode, NPChooseFileCallback callback, - void* user_data) { - return false; - } + void* user_data); protected: WebPluginFileDelegate() {} diff --git a/webkit/glue/plugins/webview_plugin.cc b/webkit/glue/plugins/webview_plugin.cc index e0f80e3..f89ccb4 100644 --- a/webkit/glue/plugins/webview_plugin.cc +++ b/webkit/glue/plugins/webview_plugin.cc @@ -105,6 +105,10 @@ void WebViewPlugin::destroy() { MessageLoop::current()->DeleteSoon(FROM_HERE, this); } +NPObject* WebViewPlugin::scriptableObject() { + return NULL; +} + void WebViewPlugin::paint(WebCanvas* canvas, const WebRect& rect) { gfx::Rect paintRect(rect_.Intersect(rect)); if (paintRect.IsEmpty()) @@ -143,6 +147,10 @@ void WebViewPlugin::updateGeometry( } } +bool WebViewPlugin::acceptsInputEvents() { + return true; +} + bool WebViewPlugin::handleInputEvent(const WebInputEvent& event, WebCursorInfo& cursor) { if (event.type == WebInputEvent::ContextMenu) { @@ -178,6 +186,10 @@ void WebViewPlugin::didFailLoading(const WebURLError& error) { error_.reset(new WebURLError(error)); } +bool WebViewPlugin::acceptsLoadDrops() { + return false; +} + void WebViewPlugin::setToolTipText(const WebKit::WebString& text, WebKit::WebTextDirection hint) { if (container_) diff --git a/webkit/glue/plugins/webview_plugin.h b/webkit/glue/plugins/webview_plugin.h index ac89c85..f3c75c1 100644 --- a/webkit/glue/plugins/webview_plugin.h +++ b/webkit/glue/plugins/webview_plugin.h @@ -70,7 +70,7 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, virtual bool initialize(WebKit::WebPluginContainer*); virtual void destroy(); - virtual NPObject* scriptableObject() { return NULL; } + virtual NPObject* scriptableObject(); virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); @@ -82,7 +82,7 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, virtual void updateFocus(bool) { } virtual void updateVisibility(bool) { } - virtual bool acceptsInputEvents() { return true; } + virtual bool acceptsInputEvents(); virtual bool handleInputEvent(const WebKit::WebInputEvent& event, WebKit::WebCursorInfo& cursor_info); @@ -99,7 +99,7 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, const WebKit::WebURLError& error) { } // WebViewClient methods: - virtual bool acceptsLoadDrops() { return false; } + virtual bool acceptsLoadDrops(); virtual void setToolTipText(const WebKit::WebString&, WebKit::WebTextDirection); diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index d986324..3e3ddce 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -324,6 +324,8 @@ 'plugins/webplugin_delegate_impl_gtk.cc', 'plugins/webplugin_delegate_impl_mac.mm', 'plugins/webplugin_delegate_impl_win.cc', + 'plugins/webplugin_file_delegate.cc', + 'plugins/webplugin_file_delegate.h', 'plugins/webplugin_impl.cc', 'plugins/webplugin_impl.h', 'plugins/webplugin_print_delegate.cc', |