diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 00:44:39 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 00:44:39 +0000 |
commit | e4be2dd25b1883bad7bed358e52e04f01c6e6f78 (patch) | |
tree | 842b39b7ea3547a97e07e2d4dcbb4795020c435c | |
parent | 6415176be8ad6b36d4adafa1c8e76aa89c5ca17c (diff) | |
download | chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.zip chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.tar.gz chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.tar.bz2 |
Deinline even more destructors.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/5794003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69084 0039d316-1c4b-4281-b951-d872f2087c98
138 files changed, 1009 insertions, 428 deletions
diff --git a/chrome/browser/autofill/address_field.cc b/chrome/browser/autofill/address_field.cc index 41a1a1d..ea7dea7 100644 --- a/chrome/browser/autofill/address_field.cc +++ b/chrome/browser/autofill/address_field.cc @@ -70,6 +70,10 @@ bool AddressField::GetFieldInfo(FieldTypeMap* field_type_map) const { return ok; } +FormFieldType AddressField::GetFormFieldType() const { + return kAddressType; +} + AddressField* AddressField::Parse( std::vector<AutoFillField*>::const_iterator* iter, bool is_ecml) { diff --git a/chrome/browser/autofill/address_field.h b/chrome/browser/autofill/address_field.h index 51dd105..116ae35 100644 --- a/chrome/browser/autofill/address_field.h +++ b/chrome/browser/autofill/address_field.h @@ -16,7 +16,7 @@ class AutoFillField; class AddressField : public FormField { public: virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const; - virtual FormFieldType GetFormFieldType() const { return kAddressType; } + virtual FormFieldType GetFormFieldType() const; static AddressField* Parse(std::vector<AutoFillField*>::const_iterator* iter, bool is_ecml); diff --git a/chrome/browser/autofill/home_phone_number.cc b/chrome/browser/autofill/home_phone_number.cc new file mode 100644 index 0000000..f48efa8 --- /dev/null +++ b/chrome/browser/autofill/home_phone_number.cc @@ -0,0 +1,29 @@ +// 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/autofill/home_phone_number.h" + +FormGroup* HomePhoneNumber::Clone() const { + return new HomePhoneNumber(*this); +} + +AutoFillFieldType HomePhoneNumber::GetNumberType() const { + return PHONE_HOME_NUMBER; +} + +AutoFillFieldType HomePhoneNumber::GetCityCodeType() const { + return PHONE_HOME_CITY_CODE; +} + +AutoFillFieldType HomePhoneNumber::GetCountryCodeType() const { + return PHONE_HOME_COUNTRY_CODE; +} + +AutoFillFieldType HomePhoneNumber::GetCityAndNumberType() const { + return PHONE_HOME_CITY_AND_NUMBER; +} + +AutoFillFieldType HomePhoneNumber::GetWholeNumberType() const { + return PHONE_HOME_WHOLE_NUMBER; +} diff --git a/chrome/browser/autofill/home_phone_number.h b/chrome/browser/autofill/home_phone_number.h index e2aba0a..3e311e6 100644 --- a/chrome/browser/autofill/home_phone_number.h +++ b/chrome/browser/autofill/home_phone_number.h @@ -13,28 +13,14 @@ class FormGroup; class HomePhoneNumber : public PhoneNumber { public: HomePhoneNumber() {} - virtual FormGroup* Clone() const { return new HomePhoneNumber(*this); } + virtual FormGroup* Clone() const; protected: - virtual AutoFillFieldType GetNumberType() const { - return PHONE_HOME_NUMBER; - } - - virtual AutoFillFieldType GetCityCodeType() const { - return PHONE_HOME_CITY_CODE; - } - - virtual AutoFillFieldType GetCountryCodeType() const { - return PHONE_HOME_COUNTRY_CODE; - } - - virtual AutoFillFieldType GetCityAndNumberType() const { - return PHONE_HOME_CITY_AND_NUMBER; - } - - virtual AutoFillFieldType GetWholeNumberType() const { - return PHONE_HOME_WHOLE_NUMBER; - } + virtual AutoFillFieldType GetNumberType() const; + virtual AutoFillFieldType GetCityCodeType() const; + virtual AutoFillFieldType GetCountryCodeType() const; + virtual AutoFillFieldType GetCityAndNumberType() const; + virtual AutoFillFieldType GetWholeNumberType() const; private: explicit HomePhoneNumber(const HomePhoneNumber& phone) : PhoneNumber(phone) {} diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index c18cb1e..3d6d5be 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -1169,6 +1169,15 @@ AutomationProviderBookmarkModelObserver:: model_->RemoveObserver(this); } +void AutomationProviderBookmarkModelObserver::Loaded(BookmarkModel* model) { + ReplyAndDelete(true); +} + +void AutomationProviderBookmarkModelObserver::BookmarkModelBeingDeleted( + BookmarkModel* model) { + ReplyAndDelete(false); +} + void AutomationProviderBookmarkModelObserver::ReplyAndDelete(bool success) { AutomationMsg_WaitForBookmarkModelToLoad::WriteReplyParams( reply_message_, success); diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h index 2411bb9..a1773e2 100644 --- a/chrome/browser/automation/automation_provider_observers.h +++ b/chrome/browser/automation/automation_provider_observers.h @@ -648,12 +648,8 @@ class AutomationProviderBookmarkModelObserver : BookmarkModelObserver { BookmarkModel* model); virtual ~AutomationProviderBookmarkModelObserver(); - virtual void Loaded(BookmarkModel* model) { - ReplyAndDelete(true); - } - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) { - ReplyAndDelete(false); - } + virtual void Loaded(BookmarkModel* model); + virtual void BookmarkModelBeingDeleted(BookmarkModel* model); virtual void BookmarkNodeMoved(BookmarkModel* model, const BookmarkNode* old_parent, int old_index, diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc index b962526..32b9d07 100644 --- a/chrome/browser/bookmarks/bookmark_context_menu_controller.cc +++ b/chrome/browser/bookmarks/bookmark_context_menu_controller.cc @@ -278,6 +278,12 @@ bool BookmarkContextMenuController::IsCommandIdEnabled(int command_id) const { return true; } +bool BookmarkContextMenuController::GetAcceleratorForCommandId( + int command_id, + menus::Accelerator* accelerator) { + return false; +} + void BookmarkContextMenuController::BookmarkModelChanged() { if (delegate_) delegate_->CloseMenu(); diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller.h b/chrome/browser/bookmarks/bookmark_context_menu_controller.h index b047a1b..f5f04af 100644 --- a/chrome/browser/bookmarks/bookmark_context_menu_controller.h +++ b/chrome/browser/bookmarks/bookmark_context_menu_controller.h @@ -60,9 +60,7 @@ class BookmarkContextMenuController : public BaseBookmarkModelObserver, virtual bool IsCommandIdChecked(int command_id) const; virtual bool IsCommandIdEnabled(int command_id) const; virtual bool GetAcceleratorForCommandId(int command_id, - menus::Accelerator* accelerator) { - return false; - } + menus::Accelerator* accelerator); virtual void ExecuteCommand(int command_id); // Accessors: diff --git a/chrome/browser/diagnostics/diagnostics_test.cc b/chrome/browser/diagnostics/diagnostics_test.cc new file mode 100644 index 0000000..cd36c92 --- /dev/null +++ b/chrome/browser/diagnostics/diagnostics_test.cc @@ -0,0 +1,53 @@ +// 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/diagnostics/diagnostics_test.h" + +#include "base/file_path.h" +#include "base/path_service.h" +#include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_paths.h" + +DiagnosticTest::DiagnosticTest(const string16& title) + : title_(title), result_(DiagnosticsModel::TEST_NOT_RUN) { +} + +DiagnosticTest::~DiagnosticTest() { +} + +bool DiagnosticTest::Execute(DiagnosticsModel::Observer* observer, + DiagnosticsModel* model, + size_t index) { + result_ = DiagnosticsModel::TEST_RUNNING; + observer->OnProgress(index, 0, model); + bool keep_going = ExecuteImpl(observer); + observer->OnFinished(index, model); + return keep_going; +} + +string16 DiagnosticTest::GetTitle() { + return title_; +} + +DiagnosticsModel::TestResult DiagnosticTest::GetResult() { + return result_; +} + +string16 DiagnosticTest::GetAdditionalInfo() { + return additional_info_; +} + +void DiagnosticTest::RecordOutcome(const string16& additional_info, + DiagnosticsModel::TestResult result) { + additional_info_ = additional_info; + result_ = result; +} + +// static +FilePath DiagnosticTest::GetUserDefaultProfileDir() { + FilePath path; + if (!PathService::Get(chrome::DIR_USER_DATA, &path)) + return FilePath(); + return path.Append(FilePath::FromWStringHack(chrome::kNotSignedInProfile)); +} diff --git a/chrome/browser/diagnostics/diagnostics_test.h b/chrome/browser/diagnostics/diagnostics_test.h index 998a0d1..70d7eb7 100644 --- a/chrome/browser/diagnostics/diagnostics_test.h +++ b/chrome/browser/diagnostics/diagnostics_test.h @@ -6,12 +6,10 @@ #define CHROME_BROWSER_DIAGNOSTICS_DIAGNOSTICS_TEST_H_ #pragma once -#include "base/file_path.h" -#include "base/path_service.h" #include "base/string16.h" #include "chrome/browser/diagnostics/diagnostics_model.h" -#include "chrome/common/chrome_constants.h" -#include "chrome/common/chrome_paths.h" + +class FilePath; // Represents a single diagnostic test and encapsulates the common // functionality across platforms as well. @@ -27,33 +25,20 @@ class DiagnosticTest : public DiagnosticsModel::TestInfo { public: // |title| is the human readable, localized string that says that // the objective of the test is. - explicit DiagnosticTest(const string16& title) - : title_(title), result_(DiagnosticsModel::TEST_NOT_RUN) {} + explicit DiagnosticTest(const string16& title); - virtual ~DiagnosticTest() {} + virtual ~DiagnosticTest(); // Runs the test. Returning false signals that no more tests should be run. // The actual outcome of the test should be set using the RecordXX functions. bool Execute(DiagnosticsModel::Observer* observer, DiagnosticsModel* model, - size_t index) { - result_ = DiagnosticsModel::TEST_RUNNING; - observer->OnProgress(index, 0, model); - bool keep_going = ExecuteImpl(observer); - observer->OnFinished(index, model); - return keep_going; - } + size_t index); - virtual string16 GetTitle() { - return title_; - } + virtual string16 GetTitle(); - virtual DiagnosticsModel::TestResult GetResult() { - return result_; - } + virtual DiagnosticsModel::TestResult GetResult(); - virtual string16 GetAdditionalInfo() { - return additional_info_; - } + virtual string16 GetAdditionalInfo(); void RecordStopFailure(const string16& additional_info) { RecordOutcome(additional_info, DiagnosticsModel::TEST_FAIL_STOP); @@ -68,17 +53,9 @@ class DiagnosticTest : public DiagnosticsModel::TestInfo { } void RecordOutcome(const string16& additional_info, - DiagnosticsModel::TestResult result) { - additional_info_ = additional_info; - result_ = result; - } + DiagnosticsModel::TestResult result); - static FilePath GetUserDefaultProfileDir() { - FilePath path; - if (!PathService::Get(chrome::DIR_USER_DATA, &path)) - return FilePath(); - return path.Append(FilePath::FromWStringHack(chrome::kNotSignedInProfile)); - } + static FilePath GetUserDefaultProfileDir(); protected: // The id needs to be overriden by derived classes and must uniquely diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc index bda422b..f657fef 100644 --- a/chrome/browser/diagnostics/recon_diagnostics.cc +++ b/chrome/browser/diagnostics/recon_diagnostics.cc @@ -15,6 +15,7 @@ #include "base/path_service.h" #include "chrome/browser/diagnostics/diagnostics_test.h" #include "chrome/browser/platform_util.h" +#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_version_info.h" #include "chrome/common/json_value_serializer.h" diff --git a/chrome/browser/dom_ui/dom_ui_screenshot_source.cc b/chrome/browser/dom_ui/dom_ui_screenshot_source.cc index db35499..110a52e 100644 --- a/chrome/browser/dom_ui/dom_ui_screenshot_source.cc +++ b/chrome/browser/dom_ui/dom_ui_screenshot_source.cc @@ -115,3 +115,9 @@ void DOMUIScreenshotSource::StartDataRequest(const std::string& path, int request_id) { SendResponse(request_id, new RefCountedBytes(GetScreenshot(path))); } + +std::string DOMUIScreenshotSource::GetMimeType(const std::string&) const { + // We need to explicitly return a mime type, otherwise if the user tries to + // drag the image they get no extension. + return "image/png"; +} diff --git a/chrome/browser/dom_ui/dom_ui_screenshot_source.h b/chrome/browser/dom_ui/dom_ui_screenshot_source.h index 8cd8b2c..3a9aafc 100644 --- a/chrome/browser/dom_ui/dom_ui_screenshot_source.h +++ b/chrome/browser/dom_ui/dom_ui_screenshot_source.h @@ -27,11 +27,7 @@ class DOMUIScreenshotSource : public ChromeURLDataManager::DataSource { bool is_off_the_record, int request_id); - virtual std::string GetMimeType(const std::string&) const { - // We need to explicitly return a mime type, otherwise if the user tries to - // drag the image they get no extension. - return "image/png"; - } + virtual std::string GetMimeType(const std::string&) const; std::vector<unsigned char> GetScreenshot(const std::string& path); diff --git a/chrome/browser/dom_ui/fileicon_source.cc b/chrome/browser/dom_ui/fileicon_source.cc index 7572cdc..a720df8 100644 --- a/chrome/browser/dom_ui/fileicon_source.cc +++ b/chrome/browser/dom_ui/fileicon_source.cc @@ -59,6 +59,11 @@ void FileIconSource::StartDataRequest(const std::string& path, } } +std::string FileIconSource::GetMimeType(const std::string&) const { + // Rely on image decoder inferring the correct type. + return std::string(); +} + void FileIconSource::OnFileIconDataAvailable(IconManager::Handle handle, SkBitmap* icon) { IconManager* im = g_browser_process->icon_manager(); diff --git a/chrome/browser/dom_ui/fileicon_source.h b/chrome/browser/dom_ui/fileicon_source.h index b8e1d2f..1bcf060 100644 --- a/chrome/browser/dom_ui/fileicon_source.h +++ b/chrome/browser/dom_ui/fileicon_source.h @@ -26,10 +26,7 @@ class FileIconSource : public ChromeURLDataManager::DataSource { bool is_off_the_record, int request_id); - virtual std::string GetMimeType(const std::string&) const { - // Rely on image decoder inferring the correct type. - return std::string(); - } + virtual std::string GetMimeType(const std::string&) const; // Called when favicon data is available from the history backend. void OnFileIconDataAvailable( diff --git a/chrome/browser/dom_ui/history2_ui.cc b/chrome/browser/dom_ui/history2_ui.cc index 3e9f67e..4001bb1 100644 --- a/chrome/browser/dom_ui/history2_ui.cc +++ b/chrome/browser/dom_ui/history2_ui.cc @@ -107,6 +107,10 @@ void HistoryUIHTMLSource2::StartDataRequest(const std::string& path, SendResponse(request_id, html_bytes); } +std::string HistoryUIHTMLSource2::GetMimeType(const std::string&) const { + return "text/html"; +} + //////////////////////////////////////////////////////////////////////////////// // // HistoryHandler diff --git a/chrome/browser/dom_ui/history2_ui.h b/chrome/browser/dom_ui/history2_ui.h index b38650e..a9e1d26 100644 --- a/chrome/browser/dom_ui/history2_ui.h +++ b/chrome/browser/dom_ui/history2_ui.h @@ -30,9 +30,7 @@ class HistoryUIHTMLSource2 : public ChromeURLDataManager::DataSource { bool is_off_the_record, int request_id); - virtual std::string GetMimeType(const std::string&) const { - return "text/html"; - } + virtual std::string GetMimeType(const std::string&) const; private: ~HistoryUIHTMLSource2() {} diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc index ecf04b97..743f652 100644 --- a/chrome/browser/dom_ui/options/options_ui.cc +++ b/chrome/browser/dom_ui/options/options_ui.cc @@ -122,6 +122,10 @@ OptionsPageUIHandler::OptionsPageUIHandler() { OptionsPageUIHandler::~OptionsPageUIHandler() { } +bool OptionsPageUIHandler::IsEnabled() { + return true; +} + void OptionsPageUIHandler::UserMetricsRecordAction( const UserMetricsAction& action) { UserMetrics::RecordAction(action, dom_ui_->GetProfile()); diff --git a/chrome/browser/dom_ui/options/options_ui.h b/chrome/browser/dom_ui/options/options_ui.h index 9d412a3..ad1007d 100644 --- a/chrome/browser/dom_ui/options/options_ui.h +++ b/chrome/browser/dom_ui/options/options_ui.h @@ -47,7 +47,7 @@ class OptionsPageUIHandler : public DOMMessageHandler, virtual ~OptionsPageUIHandler(); // Is this handler enabled? - virtual bool IsEnabled() { return true; } + virtual bool IsEnabled(); // Collects localized strings for options page. virtual void GetLocalizedValues(DictionaryValue* localized_strings) = 0; diff --git a/chrome/browser/extensions/extension_infobar_delegate.cc b/chrome/browser/extensions/extension_infobar_delegate.cc index 77ed1af..3956563 100644 --- a/chrome/browser/extensions/extension_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_infobar_delegate.cc @@ -38,6 +38,10 @@ ExtensionInfoBarDelegate::~ExtensionInfoBarDelegate() { observer_->OnDelegateDeleted(); } +void ExtensionInfoBarDelegate::InfoBarDismissed() { + closing_ = true; +} + bool ExtensionInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { ExtensionInfoBarDelegate* extension_delegate = delegate->AsExtensionInfoBarDelegate(); diff --git a/chrome/browser/extensions/extension_infobar_delegate.h b/chrome/browser/extensions/extension_infobar_delegate.h index e929fee..f286a11 100644 --- a/chrome/browser/extensions/extension_infobar_delegate.h +++ b/chrome/browser/extensions/extension_infobar_delegate.h @@ -37,7 +37,7 @@ class ExtensionInfoBarDelegate : public InfoBarDelegate, void set_observer(DelegateObserver* observer) { observer_ = observer; } // Overridden from InfoBarDelegate: - virtual void InfoBarDismissed() { closing_ = true; } + virtual void InfoBarDismissed(); virtual bool EqualsDelegate(InfoBarDelegate* delegate) const; virtual void InfoBarClosed(); virtual InfoBar* CreateInfoBar(); diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index 990e093..630e5a9 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -191,6 +191,9 @@ void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path, SendResponse(request_id, html_bytes); } +std::string ExtensionsUIHTMLSource::GetMimeType(const std::string&) const { + return "text/html"; +} //////////////////////////////////////////////////////////////////////////////// // @@ -676,6 +679,11 @@ void ExtensionsDOMHandler::FileSelected(const FilePath& path, int index, dom_ui_->CallJavascriptFunction(L"window.handleFilePathSelected", results); } +void ExtensionsDOMHandler::MultiFilesSelected( + const std::vector<FilePath>& files, void* params) { + NOTREACHED(); +} + void ExtensionsDOMHandler::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { diff --git a/chrome/browser/extensions/extensions_ui.h b/chrome/browser/extensions/extensions_ui.h index 54ec298..0caec5b 100644 --- a/chrome/browser/extensions/extensions_ui.h +++ b/chrome/browser/extensions/extensions_ui.h @@ -51,9 +51,7 @@ class ExtensionsUIHTMLSource : public ChromeURLDataManager::DataSource { virtual void StartDataRequest(const std::string& path, bool is_off_the_record, int request_id); - virtual std::string GetMimeType(const std::string&) const { - return "text/html"; - } + virtual std::string GetMimeType(const std::string&) const; private: ~ExtensionsUIHTMLSource() {} @@ -190,9 +188,7 @@ class ExtensionsDOMHandler virtual void FileSelected(const FilePath& path, int index, void* params); virtual void MultiFilesSelected( - const std::vector<FilePath>& files, void* params) { - NOTREACHED(); - } + const std::vector<FilePath>& files, void* params); virtual void FileSelectionCanceled(void* params) {} // NotificationObserver diff --git a/chrome/browser/gtk/download_shelf_gtk.cc b/chrome/browser/gtk/download_shelf_gtk.cc index ecce9aa..d9b5109 100644 --- a/chrome/browser/gtk/download_shelf_gtk.cc +++ b/chrome/browser/gtk/download_shelf_gtk.cc @@ -177,6 +177,10 @@ void DownloadShelfGtk::Close() { browser_->UpdateDownloadShelfVisibility(false); } +Browser* DownloadShelfGtk::browser() const { + return browser_; +} + void DownloadShelfGtk::Closed() { // When the close animation is complete, remove all completed downloads. size_t i = 0; diff --git a/chrome/browser/gtk/download_shelf_gtk.h b/chrome/browser/gtk/download_shelf_gtk.h index bd8ff0f..9c6cceb 100644 --- a/chrome/browser/gtk/download_shelf_gtk.h +++ b/chrome/browser/gtk/download_shelf_gtk.h @@ -40,7 +40,7 @@ class DownloadShelfGtk : public DownloadShelf, virtual bool IsClosing() const; virtual void Show(); virtual void Close(); - virtual Browser* browser() const { return browser_; } + virtual Browser* browser() const; // SlideAnimatorGtk::Delegate implementation. virtual void Closed(); diff --git a/chrome/browser/gtk/html_dialog_gtk.cc b/chrome/browser/gtk/html_dialog_gtk.cc index 2568e83..d0d18b2 100644 --- a/chrome/browser/gtk/html_dialog_gtk.cc +++ b/chrome/browser/gtk/html_dialog_gtk.cc @@ -93,6 +93,10 @@ void HtmlDialogGtk::OnDialogClosed(const std::string& json_retval) { delete this; } +bool HtmlDialogGtk::ShouldShowDialogTitle() const { + return true; +} + //////////////////////////////////////////////////////////////////////////////// // TabContentsDelegate implementation: diff --git a/chrome/browser/gtk/html_dialog_gtk.h b/chrome/browser/gtk/html_dialog_gtk.h index aba28f2..6b4ddda 100644 --- a/chrome/browser/gtk/html_dialog_gtk.h +++ b/chrome/browser/gtk/html_dialog_gtk.h @@ -46,7 +46,7 @@ class HtmlDialogGtk : public HtmlDialogTabContentsDelegate, 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; // Overridden from TabContentsDelegate: virtual void MoveContents(TabContents* source, const gfx::Rect& pos); diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc index 0602f3b..8ca86ce 100644 --- a/chrome/browser/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/gtk/location_bar_view_gtk.cc @@ -756,6 +756,10 @@ LocationBarTesting* LocationBarViewGtk::GetLocationBarForTesting() { return this; } +int LocationBarViewGtk::PageActionCount() { + return page_action_views_.size(); +} + int LocationBarViewGtk::PageActionVisibleCount() { int count = 0; gtk_container_foreach(GTK_CONTAINER(page_action_hbox_.get()), diff --git a/chrome/browser/gtk/location_bar_view_gtk.h b/chrome/browser/gtk/location_bar_view_gtk.h index e62c8ed..f1b1534 100644 --- a/chrome/browser/gtk/location_bar_view_gtk.h +++ b/chrome/browser/gtk/location_bar_view_gtk.h @@ -130,7 +130,7 @@ class LocationBarViewGtk : public AutocompleteEditController, virtual LocationBarTesting* GetLocationBarForTesting(); // Implement the LocationBarTesting interface. - virtual int PageActionCount() { return page_action_views_.size(); } + virtual int PageActionCount(); virtual int PageActionVisibleCount(); virtual ExtensionAction* GetPageAction(size_t index); virtual ExtensionAction* GetVisiblePageAction(size_t index); diff --git a/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc b/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc index 530d215..5560662 100644 --- a/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc +++ b/chrome/browser/gtk/translate/translate_infobar_base_gtk.cc @@ -124,6 +124,10 @@ void TranslateInfoBarBase::AnimationProgressed(const Animation* animation) { gtk_widget_queue_draw(widget()); } +bool TranslateInfoBarBase::ShowOptionsMenuButton() const { + return false; +} + GtkWidget* TranslateInfoBarBase::CreateLabel(const std::string& text) { GtkWidget* label = gtk_label_new(text.c_str()); gtk_widget_modify_fg(label, GTK_STATE_NORMAL, >k_util::kGdkBlack); diff --git a/chrome/browser/gtk/translate/translate_infobar_base_gtk.h b/chrome/browser/gtk/translate/translate_infobar_base_gtk.h index 8b2303b..ae147ca 100644 --- a/chrome/browser/gtk/translate/translate_infobar_base_gtk.h +++ b/chrome/browser/gtk/translate/translate_infobar_base_gtk.h @@ -43,7 +43,7 @@ class TranslateInfoBarBase : public TranslateInfoBarView, protected: // Sub-classes that want to have the options menu button showing sould // override and return true. - virtual bool ShowOptionsMenuButton() const { return false; } + virtual bool ShowOptionsMenuButton() const; // Creates a label with the appropriate font and color for the translate // infobars. diff --git a/chrome/browser/modal_html_dialog_delegate.cc b/chrome/browser/modal_html_dialog_delegate.cc index 715edd9..09b4c4a1 100644 --- a/chrome/browser/modal_html_dialog_delegate.cc +++ b/chrome/browser/modal_html_dialog_delegate.cc @@ -42,6 +42,10 @@ bool ModalHtmlDialogDelegate::IsDialogModal() const { return true; } +std::wstring ModalHtmlDialogDelegate::GetDialogTitle() const { + return L"Gears"; +} + GURL ModalHtmlDialogDelegate::GetDialogContentURL() const { return params_.url; } diff --git a/chrome/browser/modal_html_dialog_delegate.h b/chrome/browser/modal_html_dialog_delegate.h index 23bb0f7..9336b3b 100644 --- a/chrome/browser/modal_html_dialog_delegate.h +++ b/chrome/browser/modal_html_dialog_delegate.h @@ -39,7 +39,7 @@ class ModalHtmlDialogDelegate // HTMLDialogUIDelegate implementation: virtual bool IsDialogModal() const; - virtual std::wstring GetDialogTitle() const { return L"Gears"; } + virtual std::wstring GetDialogTitle() const; virtual GURL GetDialogContentURL() const; virtual void GetDOMMessageHandlers( std::vector<DOMMessageHandler*>* handlers) const { } diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index df661e4..aeb6a00 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -292,6 +292,10 @@ URLRequestContext* NaClProcessHost::GetRequestContext( return NULL; } +bool NaClProcessHost::CanShutdown() { + return true; +} + #if defined(OS_WIN) // TODO(gregoryd): invoke CheckIsWow64 only once, not for each NaClProcessHost typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); diff --git a/chrome/browser/nacl_host/nacl_process_host.h b/chrome/browser/nacl_host/nacl_process_host.h index 5d6cc35..86bd614 100644 --- a/chrome/browser/nacl_host/nacl_process_host.h +++ b/chrome/browser/nacl_host/nacl_process_host.h @@ -52,7 +52,7 @@ class NaClProcessHost : public BrowserChildProcessHost { uint32 request_id, const ViewHostMsg_Resource_Request& request_data); - virtual bool CanShutdown() { return true; } + virtual bool CanShutdown(); #if defined(OS_WIN) // Check whether the browser process is running on WOW64 - Windows only diff --git a/chrome/browser/net/url_request_slow_download_job.cc b/chrome/browser/net/url_request_slow_download_job.cc index b5d7de1..d10591d 100644 --- a/chrome/browser/net/url_request_slow_download_job.cc +++ b/chrome/browser/net/url_request_slow_download_job.cc @@ -142,6 +142,8 @@ void URLRequestSlowDownloadJob::GetResponseInfo(net::HttpResponseInfo* info) { GetResponseInfoConst(info); } +URLRequestSlowDownloadJob::~URLRequestSlowDownloadJob() {} + // Private const version. void URLRequestSlowDownloadJob::GetResponseInfoConst( net::HttpResponseInfo* info) const { diff --git a/chrome/browser/net/url_request_slow_download_job.h b/chrome/browser/net/url_request_slow_download_job.h index ca4a23d..d6927b8 100644 --- a/chrome/browser/net/url_request_slow_download_job.h +++ b/chrome/browser/net/url_request_slow_download_job.h @@ -41,7 +41,7 @@ class URLRequestSlowDownloadJob : public net::URLRequestJob { static void AddUrlHandler(); private: - virtual ~URLRequestSlowDownloadJob() { } + virtual ~URLRequestSlowDownloadJob(); void GetResponseInfoConst(net::HttpResponseInfo* info) const; diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index 13b092f..86a279b 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -193,6 +193,11 @@ void BalloonHost::ShowCreatedWindow(int route_id, browser->AddTabContents(contents, disposition, initial_pos, user_gesture); } +bool BalloonHost::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, + bool* is_keyboard_shortcut) { + return false; +} + void BalloonHost::UpdatePreferredSize(const gfx::Size& new_size) { balloon_->SetContentPreferredSize(new_size); } diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h index c3c058b..358cb61 100644 --- a/chrome/browser/notifications/balloon_host.h +++ b/chrome/browser/notifications/balloon_host.h @@ -95,9 +95,7 @@ class BalloonHost : public RenderViewHostDelegate, virtual void Activate() {} virtual void Deactivate() {} virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, - bool* is_keyboard_shortcut) { - return false; - } + bool* is_keyboard_shortcut); virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} virtual void HandleMouseMove() {} virtual void HandleMouseDown(); diff --git a/chrome/browser/plugin_exceptions_table_model.cc b/chrome/browser/plugin_exceptions_table_model.cc index c690908..7ad5b13 100644 --- a/chrome/browser/plugin_exceptions_table_model.cc +++ b/chrome/browser/plugin_exceptions_table_model.cc @@ -102,6 +102,10 @@ std::wstring PluginExceptionsTableModel::GetText(int row, int column_id) { return std::wstring(); } +bool PluginExceptionsTableModel::HasGroups() { + return true; +} + void PluginExceptionsTableModel::SetObserver(TableModelObserver* observer) { observer_ = observer; } diff --git a/chrome/browser/plugin_exceptions_table_model.h b/chrome/browser/plugin_exceptions_table_model.h index d9f8e40..d345b95 100644 --- a/chrome/browser/plugin_exceptions_table_model.h +++ b/chrome/browser/plugin_exceptions_table_model.h @@ -37,7 +37,7 @@ class PluginExceptionsTableModel : public RemoveRowsTableModel, virtual int RowCount(); virtual std::wstring GetText(int row, int column_id); virtual void SetObserver(TableModelObserver* observer); - virtual bool HasGroups() { return true; } + virtual bool HasGroups(); virtual Groups GetGroups(); virtual int GetGroupID(int row); @@ -54,10 +54,10 @@ class PluginExceptionsTableModel : public RemoveRowsTableModel, friend class PluginExceptionsTableModelTest; struct SettingsEntry { - ContentSettingsPattern pattern; - int plugin_id; - ContentSetting setting; - bool is_otr; + ContentSettingsPattern pattern; + int plugin_id; + ContentSetting setting; + bool is_otr; }; void ClearSettings(); diff --git a/chrome/browser/policy/asynchronous_policy_loader.cc b/chrome/browser/policy/asynchronous_policy_loader.cc index cca7212..e78c9aa 100644 --- a/chrome/browser/policy/asynchronous_policy_loader.cc +++ b/chrome/browser/policy/asynchronous_policy_loader.cc @@ -28,6 +28,9 @@ void AsynchronousPolicyLoader::SetProvider( provider_ = provider; } +AsynchronousPolicyLoader::~AsynchronousPolicyLoader() { +} + // Manages the life cycle of a new policy map during until it's life cycle is // taken over by the policy loader. class UpdatePolicyTask : public Task { diff --git a/chrome/browser/policy/asynchronous_policy_loader.h b/chrome/browser/policy/asynchronous_policy_loader.h index 30878f5..d88cdff 100644 --- a/chrome/browser/policy/asynchronous_policy_loader.h +++ b/chrome/browser/policy/asynchronous_policy_loader.h @@ -45,7 +45,7 @@ class AsynchronousPolicyLoader // AsynchronousPolicyLoader objects should only be deleted by // RefCountedThreadSafe. friend class base::RefCountedThreadSafe<AsynchronousPolicyLoader>; - virtual ~AsynchronousPolicyLoader() {} + virtual ~AsynchronousPolicyLoader(); // Schedules a call to UpdatePolicy on |origin_loop_|. Takes ownership of // |new_policy|. diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc index 0259ed4..c777e35 100644 --- a/chrome/browser/policy/configuration_policy_pref_store.cc +++ b/chrome/browser/policy/configuration_policy_pref_store.cc @@ -348,6 +348,10 @@ PrefStore::ReadResult ConfigurationPolicyPrefStore::GetValue( return READ_OK; } +DictionaryValue* ConfigurationPolicyPrefStore::prefs() const { + return prefs_.get(); +} + void ConfigurationPolicyPrefStore::Apply(ConfigurationPolicyType policy, Value* value) { if (ApplyProxyPolicy(policy, value)) diff --git a/chrome/browser/policy/configuration_policy_pref_store.h b/chrome/browser/policy/configuration_policy_pref_store.h index 2ce8c61..820306a 100644 --- a/chrome/browser/policy/configuration_policy_pref_store.h +++ b/chrome/browser/policy/configuration_policy_pref_store.h @@ -36,7 +36,7 @@ class ConfigurationPolicyPrefStore : public PrefStore, // PrefStore methods: virtual ReadResult GetValue(const std::string& key, Value** result) const; - virtual DictionaryValue* prefs() const { return prefs_.get(); } + virtual DictionaryValue* prefs() const; // ConfigurationPolicyStore methods: virtual void Apply(ConfigurationPolicyType setting, Value* value); diff --git a/chrome/browser/policy/file_based_policy_loader.cc b/chrome/browser/policy/file_based_policy_loader.cc index 4c33b91..947008b 100644 --- a/chrome/browser/policy/file_based_policy_loader.cc +++ b/chrome/browser/policy/file_based_policy_loader.cc @@ -81,6 +81,8 @@ void FileBasedPolicyLoader::OnError() { << " failed."; } +FileBasedPolicyLoader::~FileBasedPolicyLoader() {} + void FileBasedPolicyLoader::Reload() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); diff --git a/chrome/browser/policy/file_based_policy_loader.h b/chrome/browser/policy/file_based_policy_loader.h index 8acf9b2d..c1b32f2 100644 --- a/chrome/browser/policy/file_based_policy_loader.h +++ b/chrome/browser/policy/file_based_policy_loader.h @@ -33,7 +33,7 @@ class FileBasedPolicyLoader : public AsynchronousPolicyLoader { // FileBasedPolicyLoader objects should only be deleted by // RefCountedThreadSafe. friend class base::RefCountedThreadSafe<AsynchronousPolicyLoader>; - virtual ~FileBasedPolicyLoader() {} + virtual ~FileBasedPolicyLoader(); const FilePath& config_file_path() { return config_file_path_; } diff --git a/chrome/browser/prefs/pref_value_map.cc b/chrome/browser/prefs/pref_value_map.cc index 8d37f2b..ff27049 100644 --- a/chrome/browser/prefs/pref_value_map.cc +++ b/chrome/browser/prefs/pref_value_map.cc @@ -9,6 +9,8 @@ #include "base/stl_util-inl.h" #include "base/values.h" +PrefValueMap::PrefValueMap() {} + PrefValueMap::~PrefValueMap() { Clear(); } diff --git a/chrome/browser/prefs/pref_value_map.h b/chrome/browser/prefs/pref_value_map.h index 26b6214..ddcddf2 100644 --- a/chrome/browser/prefs/pref_value_map.h +++ b/chrome/browser/prefs/pref_value_map.h @@ -16,7 +16,7 @@ class Value; // A generic string to value map used by the PrefStore implementations. class PrefValueMap { public: - PrefValueMap() {} + PrefValueMap(); virtual ~PrefValueMap(); // Gets the value for |key| and stores it in |value|. Ownership remains with diff --git a/chrome/browser/prefs/value_map_pref_store.cc b/chrome/browser/prefs/value_map_pref_store.cc index 82574b2..705c958 100644 --- a/chrome/browser/prefs/value_map_pref_store.cc +++ b/chrome/browser/prefs/value_map_pref_store.cc @@ -9,6 +9,10 @@ #include "base/stl_util-inl.h" #include "base/values.h" +ValueMapPrefStore::ValueMapPrefStore() {} + +ValueMapPrefStore::~ValueMapPrefStore() {} + PrefStore::ReadResult ValueMapPrefStore::GetValue(const std::string& key, Value** value) const { return prefs_.GetValue(key, value) ? READ_OK : READ_NO_VALUE; diff --git a/chrome/browser/prefs/value_map_pref_store.h b/chrome/browser/prefs/value_map_pref_store.h index dbfba80..20bf2902 100644 --- a/chrome/browser/prefs/value_map_pref_store.h +++ b/chrome/browser/prefs/value_map_pref_store.h @@ -17,8 +17,8 @@ // storing the preference values. class ValueMapPrefStore : public PrefStore { public: - ValueMapPrefStore() {} - virtual ~ValueMapPrefStore() {} + ValueMapPrefStore(); + virtual ~ValueMapPrefStore(); // PrefStore overrides: virtual ReadResult GetValue(const std::string& key, Value** value) const; diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc index fbd0dc6..fddff26 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc @@ -165,19 +165,23 @@ std::string CloudPrintSetupFlow::GetDialogArgs() const { return dialog_start_args_; } -void CloudPrintSetupFlow::OnCloseContents(TabContents* source, - bool* out_close_dialog) { +void CloudPrintSetupFlow::OnCloseContents(TabContents* source, + bool* out_close_dialog) { } -std::wstring CloudPrintSetupFlow::GetDialogTitle() const { +std::wstring CloudPrintSetupFlow::GetDialogTitle() const { return l10n_util::GetString(IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE); } -bool CloudPrintSetupFlow::IsDialogModal() const { +bool CloudPrintSetupFlow::IsDialogModal() const { // We are always modeless. return false; } +bool CloudPrintSetupFlow::ShouldShowDialogTitle() const { + return true; +} + /////////////////////////////////////////////////////////////////////////////// // GaiaAuthConsumer implementation. void CloudPrintSetupFlow::OnClientLoginFailure( diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.h b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.h index 14354e3..86077ab 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_setup_flow.h +++ b/chrome/browser/printing/cloud_print/cloud_print_setup_flow.h @@ -70,7 +70,7 @@ class CloudPrintSetupFlow : public HtmlDialogUIDelegate, virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); virtual std::wstring GetDialogTitle() const; virtual bool IsDialogModal() const; - virtual bool ShouldShowDialogTitle() const { return true; } + virtual bool ShouldShowDialogTitle() const; // GaiaAuthConsumer implementation. virtual void OnClientLoginFailure( diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc index a19ade2..972f088 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc @@ -126,6 +126,10 @@ void CloudPrintSetupSource::StartDataRequest(const std::string& path_raw, SendResponse(request_id, html_bytes); } +std::string CloudPrintSetupSource::GetMimeType(const std::string& path) const { + return "text/html"; +} + std::string CloudPrintSetupSource::GetLocalizedUrl( const std::string& url) const { GURL original_url(url); diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_source.h b/chrome/browser/printing/cloud_print/cloud_print_setup_source.h index 3fa3048..7050c5e 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_setup_source.h +++ b/chrome/browser/printing/cloud_print/cloud_print_setup_source.h @@ -18,9 +18,7 @@ class CloudPrintSetupSource : public ChromeURLDataManager::DataSource { bool is_off_the_record, int request_id); - virtual std::string GetMimeType(const std::string& path) const { - return "text/html"; - } + virtual std::string GetMimeType(const std::string& path) const; static const char kInvalidPasswordHelpUrl[]; static const char kCanNotAccessAccountUrl[]; diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc index df9df0f..c67b8f5 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -86,6 +86,14 @@ PrintJobWorker* PrintJob::DetachWorker(PrintJobWorkerOwner* new_owner) { return NULL; } +MessageLoop* PrintJob::message_loop() { + return ui_message_loop_; +} + +const PrintSettings& PrintJob::settings() const { + return settings_; +} + int PrintJob::cookie() const { if (!document_.get()) // Always use an invalid cookie in this case. diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h index e78f1a9..03aacda 100644 --- a/chrome/browser/printing/print_job.h +++ b/chrome/browser/printing/print_job.h @@ -54,8 +54,8 @@ class PrintJob : public PrintJobWorkerOwner, virtual void GetSettingsDone(const PrintSettings& new_settings, PrintingContext::Result result); virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner); - virtual MessageLoop* message_loop() { return ui_message_loop_; } - virtual const PrintSettings& settings() const { return settings_; } + virtual MessageLoop* message_loop(); + virtual const PrintSettings& settings() const; virtual int cookie() const; // DestructionObserver diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc index 7b73d86..87ec00f 100644 --- a/chrome/browser/printing/printer_query.cc +++ b/chrome/browser/printing/printer_query.cc @@ -58,6 +58,18 @@ PrintJobWorker* PrinterQuery::DetachWorker(PrintJobWorkerOwner* new_owner) { return worker_.release(); } +MessageLoop* PrinterQuery::message_loop() { + return io_message_loop_; +} + +const PrintSettings& PrinterQuery::settings() const { + return settings_; +} + +int PrinterQuery::cookie() const { + return cookie_; +} + void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings, gfx::NativeView parent_view, int expected_page_count, diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h index 470eff7..dc18b1f 100644 --- a/chrome/browser/printing/printer_query.h +++ b/chrome/browser/printing/printer_query.h @@ -36,12 +36,9 @@ class PrinterQuery : public PrintJobWorkerOwner { virtual void GetSettingsDone(const PrintSettings& new_settings, PrintingContext::Result result); virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner); - virtual MessageLoop* message_loop() { - return io_message_loop_; - } - virtual const PrintSettings& settings() const { return settings_; } - - virtual int cookie() const { return cookie_; } + virtual MessageLoop* message_loop(); + virtual const PrintSettings& settings() const; + virtual int cookie() const; // Initializes the printing context. It is fine to call this function multiple // times to reinitialize the settings. |parent_view| parameter's window will diff --git a/chrome/browser/remoting/remoting_resources_source.cc b/chrome/browser/remoting/remoting_resources_source.cc index 1af7a2a9..9057e1d 100644 --- a/chrome/browser/remoting/remoting_resources_source.cc +++ b/chrome/browser/remoting/remoting_resources_source.cc @@ -113,6 +113,11 @@ void RemotingResourcesSource::StartDataRequest(const std::string& path_raw, SendResponse(request_id, html_bytes); } +std::string RemotingResourcesSource::GetMimeType( + const std::string& path) const { + return "text/html"; +} + std::string RemotingResourcesSource::GetLocalizedUrl( const std::string& url) const { GURL original_url(url); diff --git a/chrome/browser/remoting/remoting_resources_source.h b/chrome/browser/remoting/remoting_resources_source.h index 96d1b4d..4d73d8e 100644 --- a/chrome/browser/remoting/remoting_resources_source.h +++ b/chrome/browser/remoting/remoting_resources_source.h @@ -13,9 +13,7 @@ class RemotingResourcesSource : public ChromeURLDataManager::DataSource { bool is_off_the_record, int request_id); - virtual std::string GetMimeType(const std::string& path) const { - return "text/html"; - } + virtual std::string GetMimeType(const std::string& path) const; static const char kInvalidPasswordHelpUrl[]; static const char kCanNotAccessAccountUrl[]; 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 cf3418a..e90e096 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -531,6 +531,10 @@ void RenderWidgetHostViewGtk::InitAsFullscreen( DoInitAsPopup(parent_host_view, GTK_WINDOW_TOPLEVEL, gfx::Rect(), true); } +RenderWidgetHost* RenderWidgetHostViewGtk::GetRenderWidgetHost() const { + return host_; +} + void RenderWidgetHostViewGtk::DidBecomeSelected() { if (!is_hidden_) return; diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.h b/chrome/browser/renderer_host/render_widget_host_view_gtk.h index 7af66f8..9f9b2e2 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.h +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.h @@ -55,7 +55,7 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView, virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, const gfx::Rect& pos); virtual void InitAsFullscreen(RenderWidgetHostView* parent_host_view); - virtual RenderWidgetHost* GetRenderWidgetHost() const { return host_; } + virtual RenderWidgetHost* GetRenderWidgetHost() const; virtual void DidBecomeSelected(); virtual void WasHidden(); virtual void SetSize(const gfx::Size& size); diff --git a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc index cf3369a..c9cf026 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc +++ b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.cc @@ -84,6 +84,10 @@ void SafeBrowsingStoreSqlite::Init(const FilePath& filename, corruption_callback_.reset(corruption_callback); } +bool SafeBrowsingStoreSqlite::BeginChunk() { + return true; +} + bool SafeBrowsingStoreSqlite::GetAddPrefixes( std::vector<SBAddPrefix>* add_prefixes) { add_prefixes->clear(); @@ -93,6 +97,39 @@ bool SafeBrowsingStoreSqlite::GetAddPrefixes( return ret; } +bool SafeBrowsingStoreSqlite::WriteAddPrefix(int32 chunk_id, SBPrefix prefix) { + const std::vector<SBAddPrefix> prefixes(1, SBAddPrefix(chunk_id, prefix)); + return WriteAddPrefixes(prefixes); +} + +bool SafeBrowsingStoreSqlite::WriteAddHash(int32 chunk_id, + base::Time receive_time, + const SBFullHash& full_hash) { + const std::vector<SBAddFullHash> + hashes(1, SBAddFullHash(chunk_id, receive_time, full_hash)); + return WriteAddHashes(hashes); +} + +bool SafeBrowsingStoreSqlite::WriteSubPrefix(int32 chunk_id, + int32 add_chunk_id, + SBPrefix prefix) { + const std::vector<SBSubPrefix> + prefixes(1, SBSubPrefix(chunk_id, add_chunk_id, prefix)); + return WriteSubPrefixes(prefixes); +} + +bool SafeBrowsingStoreSqlite::WriteSubHash(int32 chunk_id, + int32 add_chunk_id, + const SBFullHash& full_hash) { + const std::vector<SBSubFullHash> + hashes(1, SBSubFullHash(chunk_id, add_chunk_id, full_hash)); + return WriteSubHashes(hashes); +} + +bool SafeBrowsingStoreSqlite::FinishChunk() { + return true; +} + bool SafeBrowsingStoreSqlite::OnCorruptDatabase() { if (corruption_callback_.get()) corruption_callback_->Run(); @@ -670,3 +707,43 @@ bool SafeBrowsingStoreSqlite::FinishUpdate( bool SafeBrowsingStoreSqlite::CancelUpdate() { return Close(); } + +void SafeBrowsingStoreSqlite::SetAddChunk(int32 chunk_id) { + add_chunks_cache_.insert(chunk_id); +} + +bool SafeBrowsingStoreSqlite::CheckAddChunk(int32 chunk_id) { + return add_chunks_cache_.count(chunk_id) > 0; +} + +void SafeBrowsingStoreSqlite::GetAddChunks(std::vector<int32>* out) { + out->clear(); + out->insert(out->end(), add_chunks_cache_.begin(), add_chunks_cache_.end()); +} + +void SafeBrowsingStoreSqlite::SetSubChunk(int32 chunk_id) { + sub_chunks_cache_.insert(chunk_id); +} + +bool SafeBrowsingStoreSqlite::CheckSubChunk(int32 chunk_id) { + return sub_chunks_cache_.count(chunk_id) > 0; +} + +void SafeBrowsingStoreSqlite::GetSubChunks(std::vector<int32>* out) { + out->clear(); + out->insert(out->end(), sub_chunks_cache_.begin(), sub_chunks_cache_.end()); +} + +void SafeBrowsingStoreSqlite::DeleteAddChunk(int32 chunk_id) { + add_del_cache_.insert(chunk_id); +} + +void SafeBrowsingStoreSqlite::DeleteSubChunk(int32 chunk_id) { + sub_del_cache_.insert(chunk_id); +} + +// static +const FilePath SafeBrowsingStoreSqlite::JournalFileForFilename( + const FilePath& filename) { + return FilePath(filename.value() + FILE_PATH_LITERAL("-journal")); +} diff --git a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h index b577b08..f9d4381 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h +++ b/chrome/browser/safe_browsing/safe_browsing_store_sqlite.h @@ -29,38 +29,19 @@ class SafeBrowsingStoreSqlite : public SafeBrowsingStore { virtual void Init(const FilePath& filename, Callback0::Type* corruption_callback); - virtual bool BeginChunk() { - return true; - } + virtual bool BeginChunk(); // Get all Add prefixes out from the store. virtual bool GetAddPrefixes(std::vector<SBAddPrefix>* add_prefixes); - virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix) { - const std::vector<SBAddPrefix> prefixes(1, SBAddPrefix(chunk_id, prefix)); - return WriteAddPrefixes(prefixes); - } + virtual bool WriteAddPrefix(int32 chunk_id, SBPrefix prefix); virtual bool WriteAddHash(int32 chunk_id, base::Time receive_time, - const SBFullHash& full_hash) { - const std::vector<SBAddFullHash> - hashes(1, SBAddFullHash(chunk_id, receive_time, full_hash)); - return WriteAddHashes(hashes); - } + const SBFullHash& full_hash); virtual bool WriteSubPrefix(int32 chunk_id, - int32 add_chunk_id, SBPrefix prefix) { - const std::vector<SBSubPrefix> - prefixes(1, SBSubPrefix(chunk_id, add_chunk_id, prefix)); - return WriteSubPrefixes(prefixes); - } + int32 add_chunk_id, SBPrefix prefix); virtual bool WriteSubHash(int32 chunk_id, int32 add_chunk_id, - const SBFullHash& full_hash) { - const std::vector<SBSubFullHash> - hashes(1, SBSubFullHash(chunk_id, add_chunk_id, full_hash)); - return WriteSubHashes(hashes); - } - virtual bool FinishChunk() { - return true; - } + const SBFullHash& full_hash); + virtual bool FinishChunk(); virtual bool BeginUpdate(); // TODO(shess): Should not be public. @@ -75,40 +56,20 @@ class SafeBrowsingStoreSqlite : public SafeBrowsingStore { std::vector<SBAddFullHash>* add_full_hashes_result); virtual bool CancelUpdate(); - virtual void SetAddChunk(int32 chunk_id) { - add_chunks_cache_.insert(chunk_id); - } - virtual bool CheckAddChunk(int32 chunk_id) { - return add_chunks_cache_.count(chunk_id) > 0; - } - virtual void GetAddChunks(std::vector<int32>* out) { - out->clear(); - out->insert(out->end(), add_chunks_cache_.begin(), add_chunks_cache_.end()); - } - - virtual void SetSubChunk(int32 chunk_id) { - sub_chunks_cache_.insert(chunk_id); - } - virtual bool CheckSubChunk(int32 chunk_id) { - return sub_chunks_cache_.count(chunk_id) > 0; - } - virtual void GetSubChunks(std::vector<int32>* out) { - out->clear(); - out->insert(out->end(), sub_chunks_cache_.begin(), sub_chunks_cache_.end()); - } - - virtual void DeleteAddChunk(int32 chunk_id) { - add_del_cache_.insert(chunk_id); - } - virtual void DeleteSubChunk(int32 chunk_id) { - sub_del_cache_.insert(chunk_id); - } + virtual void SetAddChunk(int32 chunk_id); + virtual bool CheckAddChunk(int32 chunk_id); + virtual void GetAddChunks(std::vector<int32>* out); + + virtual void SetSubChunk(int32 chunk_id); + virtual bool CheckSubChunk(int32 chunk_id); + virtual void GetSubChunks(std::vector<int32>* out); + + virtual void DeleteAddChunk(int32 chunk_id); + virtual void DeleteSubChunk(int32 chunk_id); // Returns the name of the SQLite journal file for |filename|. // Exported for unit tests. - static const FilePath JournalFileForFilename(const FilePath& filename) { - return FilePath(filename.value() + FILE_PATH_LITERAL("-journal")); - } + static const FilePath JournalFileForFilename(const FilePath& filename); private: // For on-the-fly migration. diff --git a/chrome/browser/ssl/ssl_cert_error_handler.cc b/chrome/browser/ssl/ssl_cert_error_handler.cc index 40bf067..97b0e05 100644 --- a/chrome/browser/ssl/ssl_cert_error_handler.cc +++ b/chrome/browser/ssl/ssl_cert_error_handler.cc @@ -28,6 +28,10 @@ SSLCertErrorHandler::SSLCertErrorHandler( ssl_info_.SetCertError(cert_error); } +SSLCertErrorHandler* SSLCertErrorHandler::AsSSLCertErrorHandler() { + return this; +} + void SSLCertErrorHandler::OnDispatchFailed() { CancelRequest(); } diff --git a/chrome/browser/ssl/ssl_cert_error_handler.h b/chrome/browser/ssl/ssl_cert_error_handler.h index a4bdd0d..4f71999 100644 --- a/chrome/browser/ssl/ssl_cert_error_handler.h +++ b/chrome/browser/ssl/ssl_cert_error_handler.h @@ -29,7 +29,7 @@ class SSLCertErrorHandler : public SSLErrorHandler { int cert_error, net::X509Certificate* cert); - virtual SSLCertErrorHandler* AsSSLCertErrorHandler() { return this; } + virtual SSLCertErrorHandler* AsSSLCertErrorHandler(); // These accessors are available on either thread const net::SSLInfo& ssl_info() const { return ssl_info_; } diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc index 7f90bac..0bc04d8 100644 --- a/chrome/browser/ssl/ssl_error_handler.cc +++ b/chrome/browser/ssl/ssl_error_handler.cc @@ -56,6 +56,10 @@ void SSLErrorHandler::OnDispatched() { TakeNoAction(); } +SSLCertErrorHandler* SSLErrorHandler::AsSSLCertErrorHandler() { + return NULL; +} + void SSLErrorHandler::Dispatch() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); diff --git a/chrome/browser/ssl/ssl_error_handler.h b/chrome/browser/ssl/ssl_error_handler.h index 7d4a9cf..578429c 100644 --- a/chrome/browser/ssl/ssl_error_handler.h +++ b/chrome/browser/ssl/ssl_error_handler.h @@ -39,7 +39,7 @@ class URLRequest; // class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> { public: - virtual SSLCertErrorHandler* AsSSLCertErrorHandler() { return NULL; } + virtual SSLCertErrorHandler* AsSSLCertErrorHandler(); // Find the appropriate SSLManager for the net::URLRequest and begin handling // this error. diff --git a/chrome/browser/sync/glue/app_data_type_controller.cc b/chrome/browser/sync/glue/app_data_type_controller.cc index cbadb80..d26b5fa 100644 --- a/chrome/browser/sync/glue/app_data_type_controller.cc +++ b/chrome/browser/sync/glue/app_data_type_controller.cc @@ -84,6 +84,27 @@ void AppDataTypeController::Stop() { state_ = NOT_RUNNING; } +bool AppDataTypeController::enabled() { + return true; +} + +syncable::ModelType AppDataTypeController::type() { + return syncable::APPS; +} + +browser_sync::ModelSafeGroup AppDataTypeController::model_safe_group() { + return browser_sync::GROUP_UI; +} + +const char* AppDataTypeController::name() const { + // For logging only. + return "app"; +} + +DataTypeController::State AppDataTypeController::state() { + return state_; +} + void AppDataTypeController::OnUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message) { diff --git a/chrome/browser/sync/glue/app_data_type_controller.h b/chrome/browser/sync/glue/app_data_type_controller.h index e8797f4..4bd2750 100644 --- a/chrome/browser/sync/glue/app_data_type_controller.h +++ b/chrome/browser/sync/glue/app_data_type_controller.h @@ -34,26 +34,15 @@ class AppDataTypeController : public DataTypeController { virtual void Stop(); - virtual bool enabled() { - return true; - } - - virtual syncable::ModelType type() { - return syncable::APPS; - } - - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_UI; - } - - virtual const char* name() const { - // For logging only. - return "app"; - } - - 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/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc index 63c9e26..6a827c9 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc @@ -148,6 +148,28 @@ void AutofillDataTypeController::Stop() { } } +bool AutofillDataTypeController::enabled() { + return true; +} + +syncable::ModelType AutofillDataTypeController::type() { + return syncable::AUTOFILL; +} + +browser_sync::ModelSafeGroup AutofillDataTypeController::model_safe_group() { + return browser_sync::GROUP_DB; +} + +const char* AutofillDataTypeController::name() const { + // For logging only. + return "autofill"; +} + +DataTypeController::State AutofillDataTypeController::state() { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + return state_; +} + void AutofillDataTypeController::StartImpl() { VLOG(1) << "Autofill data type controller StartImpl called."; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.h b/chrome/browser/sync/glue/autofill_data_type_controller.h index d22fcfaf..c66dcfd 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller.h +++ b/chrome/browser/sync/glue/autofill_data_type_controller.h @@ -40,27 +40,15 @@ class AutofillDataTypeController : public DataTypeController, virtual void Stop(); - virtual bool enabled() { - return true; - } + virtual bool enabled(); - virtual syncable::ModelType type() { - return syncable::AUTOFILL; - } + virtual syncable::ModelType type(); - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_DB; - } + virtual browser_sync::ModelSafeGroup model_safe_group(); - virtual const char* name() const { - // For logging only. - return "autofill"; - } + virtual const char* name() const; - virtual State state() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - return state_; - } + virtual State state(); // UnrecoverableHandler implementation virtual void OnUnrecoverableError(const tracked_objects::Location& from_here, diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.cc b/chrome/browser/sync/glue/autofill_profile_model_associator.cc index 727c401..91027e3 100644 --- a/chrome/browser/sync/glue/autofill_profile_model_associator.cc +++ b/chrome/browser/sync/glue/autofill_profile_model_associator.cc @@ -32,6 +32,8 @@ AutofillProfileModelAssociator::~AutofillProfileModelAssociator() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); } +AutofillProfileModelAssociator::AutofillProfileModelAssociator() {} + bool AutofillProfileModelAssociator::TraverseAndAssociateChromeAutoFillProfiles( sync_api::WriteTransaction* write_trans, const sync_api::ReadNode& autofill_root, @@ -330,6 +332,23 @@ bool AutofillProfileModelAssociator::SaveChangesToWebData( return true; } +const std::string* AutofillProfileModelAssociator::GetChromeNodeFromSyncId( + int64 sync_id) { + return NULL; + } + +bool AutofillProfileModelAssociator::InitSyncNodeFromChromeId( + const std::string& node_id, + sync_api::BaseNode* sync_node) { + return false; +} + +bool AutofillProfileModelAssociator::GetSyncIdForTaggedNode( + const std::string& tag, + int64* sync_id) { + return false; +} + void AutofillProfileModelAssociator::Associate( const std::string* autofill, int64 sync_id) { diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.h b/chrome/browser/sync/glue/autofill_profile_model_associator.h index 048b5a4..ad8af5c 100644 --- a/chrome/browser/sync/glue/autofill_profile_model_associator.h +++ b/chrome/browser/sync/glue/autofill_profile_model_associator.h @@ -70,15 +70,10 @@ class AutofillProfileModelAssociator // See ModelAssociator interface. virtual void AbortAssociation(); - virtual const std::string* GetChromeNodeFromSyncId( - int64 sync_id) { - return NULL; - } + virtual const std::string* GetChromeNodeFromSyncId(int64 sync_id); 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 autofill name, or sync_api::kInvalidId // if the autofill name is not associated to any sync id. @@ -94,15 +89,13 @@ class AutofillProfileModelAssociator // given permanent tag was found and update // |sync_id| with that node's id. No current use. To Implement // only for completeness. - virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id) { - return false; - } + virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id); // Returns sync service instance. ProfileSyncService* sync_service() { return sync_service_; } protected: - AutofillProfileModelAssociator() {} + AutofillProfileModelAssociator(); bool TraverseAndAssociateChromeAutoFillProfiles( sync_api::WriteTransaction* write_trans, const sync_api::ReadNode& autofill_root, diff --git a/chrome/browser/sync/glue/bookmark_change_processor.cc b/chrome/browser/sync/glue/bookmark_change_processor.cc index da749b8..80e02c3 100644 --- a/chrome/browser/sync/glue/bookmark_change_processor.cc +++ b/chrome/browser/sync/glue/bookmark_change_processor.cc @@ -128,6 +128,10 @@ void BookmarkChangeProcessor::RemoveSyncNodeHierarchy( DCHECK(index_stack.empty()); // Nothing should be left on the stack. } +void BookmarkChangeProcessor::Loaded(BookmarkModel* model) { + NOTREACHED(); +} + void BookmarkChangeProcessor::BookmarkModelBeingDeleted( BookmarkModel* model) { DCHECK(!running()) << "BookmarkModel deleted while ChangeProcessor running."; diff --git a/chrome/browser/sync/glue/bookmark_change_processor.h b/chrome/browser/sync/glue/bookmark_change_processor.h index 65a2632..461cbb0 100644 --- a/chrome/browser/sync/glue/bookmark_change_processor.h +++ b/chrome/browser/sync/glue/bookmark_change_processor.h @@ -31,7 +31,7 @@ class BookmarkChangeProcessor : public BookmarkModelObserver, // BookmarkModelObserver implementation. // BookmarkModel -> sync_api model change application. - virtual void Loaded(BookmarkModel* model) { NOTREACHED(); } + virtual void Loaded(BookmarkModel* model); virtual void BookmarkModelBeingDeleted(BookmarkModel* model); virtual void BookmarkNodeMoved(BookmarkModel* model, const BookmarkNode* old_parent, diff --git a/chrome/browser/sync/glue/change_processor.cc b/chrome/browser/sync/glue/change_processor.cc index 48a0876..f779070 100644 --- a/chrome/browser/sync/glue/change_processor.cc +++ b/chrome/browser/sync/glue/change_processor.cc @@ -27,4 +27,8 @@ void ChangeProcessor::Stop() { running_ = false; } +bool ChangeProcessor::IsRunning() const { + return running_; +} + } // namespace browser_sync diff --git a/chrome/browser/sync/glue/change_processor.h b/chrome/browser/sync/glue/change_processor.h index 4d6ec09..3e8a467 100644 --- a/chrome/browser/sync/glue/change_processor.h +++ b/chrome/browser/sync/glue/change_processor.h @@ -34,7 +34,7 @@ class ChangeProcessor { // |StartImpl|. void Start(Profile* profile, sync_api::UserShare* share_handle); void Stop(); - virtual bool IsRunning() const { return running_; } + virtual bool IsRunning() const; // Changes have been applied to the backend model and are ready to be // applied to the frontend model. See syncapi.h for detailed instructions on diff --git a/chrome/browser/sync/glue/theme_data_type_controller.cc b/chrome/browser/sync/glue/theme_data_type_controller.cc index be00f94..166710d 100644 --- a/chrome/browser/sync/glue/theme_data_type_controller.cc +++ b/chrome/browser/sync/glue/theme_data_type_controller.cc @@ -86,6 +86,28 @@ void ThemeDataTypeController::Stop() { state_ = NOT_RUNNING; } +bool ThemeDataTypeController::enabled() { + return true; + } + +syncable::ModelType ThemeDataTypeController::type() { + return syncable::THEMES; +} + +browser_sync::ModelSafeGroup ThemeDataTypeController::model_safe_group() { + return browser_sync::GROUP_UI; +} + +const char* ThemeDataTypeController::name() const { + // For logging only. + return "theme"; +} + +DataTypeController::State ThemeDataTypeController::state() { + return state_; +} + + void ThemeDataTypeController::OnUnrecoverableError( const tracked_objects::Location& from_here, const std::string& message) { diff --git a/chrome/browser/sync/glue/theme_data_type_controller.h b/chrome/browser/sync/glue/theme_data_type_controller.h index 2951a2d..09bc572 100644 --- a/chrome/browser/sync/glue/theme_data_type_controller.h +++ b/chrome/browser/sync/glue/theme_data_type_controller.h @@ -34,26 +34,15 @@ class ThemeDataTypeController : public DataTypeController { virtual void Stop(); - virtual bool enabled() { - return true; - } - - virtual syncable::ModelType type() { - return syncable::THEMES; - } - - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_UI; - } - - virtual const char* name() const { - // For logging only. - return "theme"; - } - - 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/typed_url_data_type_controller.cc b/chrome/browser/sync/glue/typed_url_data_type_controller.cc index 62cd399..81e8d47 100644 --- a/chrome/browser/sync/glue/typed_url_data_type_controller.cc +++ b/chrome/browser/sync/glue/typed_url_data_type_controller.cc @@ -115,6 +115,27 @@ void TypedUrlDataTypeController::Stop() { history_service_->ScheduleDBTask(new ControlTask(this, false), this); } +bool TypedUrlDataTypeController::enabled() { + return true; +} + +syncable::ModelType TypedUrlDataTypeController::type() { + return syncable::TYPED_URLS; +} + +browser_sync::ModelSafeGroup TypedUrlDataTypeController::model_safe_group() { + return browser_sync::GROUP_HISTORY; +} + +const char* TypedUrlDataTypeController::name() const { + // For logging only. + return "typed_url"; +} + +DataTypeController::State TypedUrlDataTypeController::state() { + return state_; +} + void TypedUrlDataTypeController::StartImpl(history::HistoryBackend* backend) { VLOG(1) << "TypedUrl data type controller StartImpl called."; // No additional services need to be started before we can proceed diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.h b/chrome/browser/sync/glue/typed_url_data_type_controller.h index d6cba9b..d3892a1 100644 --- a/chrome/browser/sync/glue/typed_url_data_type_controller.h +++ b/chrome/browser/sync/glue/typed_url_data_type_controller.h @@ -50,26 +50,15 @@ class TypedUrlDataTypeController : public DataTypeController, virtual void Stop(); - virtual bool enabled() { - return true; - } + virtual bool enabled(); - virtual syncable::ModelType type() { - return syncable::TYPED_URLS; - } + virtual syncable::ModelType type(); - virtual browser_sync::ModelSafeGroup model_safe_group() { - return browser_sync::GROUP_HISTORY; - } + virtual browser_sync::ModelSafeGroup model_safe_group(); - virtual const char* name() const { - // For logging only. - return "typed_url"; - } + virtual const char* name() const; - virtual State state() { - return state_; - } + virtual State state(); // UnrecoverableHandler implementation virtual void OnUnrecoverableError(const tracked_objects::Location& from_here, diff --git a/chrome/browser/sync/glue/typed_url_model_associator.cc b/chrome/browser/sync/glue/typed_url_model_associator.cc index 36d312f..9c88fc0 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator.cc +++ b/chrome/browser/sync/glue/typed_url_model_associator.cc @@ -232,6 +232,21 @@ bool TypedUrlModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) { return true; } +void TypedUrlModelAssociator::AbortAssociation() { + // TODO(zork): Implement this. +} + +const std::string* TypedUrlModelAssociator::GetChromeNodeFromSyncId( + int64 sync_id) { + return NULL; +} + +bool TypedUrlModelAssociator::InitSyncNodeFromChromeId( + const std::string& node_id, + sync_api::BaseNode* sync_node) { + return false; +} + int64 TypedUrlModelAssociator::GetSyncIdFromChromeId( const std::string& typed_url) { TypedUrlToSyncIdMap::const_iterator iter = id_map_.find(typed_url); diff --git a/chrome/browser/sync/glue/typed_url_model_associator.h b/chrome/browser/sync/glue/typed_url_model_associator.h index 72dd13e..6388de4 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator.h +++ b/chrome/browser/sync/glue/typed_url_model_associator.h @@ -73,20 +73,14 @@ class TypedUrlModelAssociator // than the permanent tagged nodes. virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); - virtual void AbortAssociation() { - // TODO(zork): Implement this. - } + virtual void AbortAssociation(); // Not implemented. - virtual const std::string* GetChromeNodeFromSyncId(int64 sync_id) { - return NULL; - } + virtual const std::string* 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 typed_url name, or sync_api::kInvalidId // if the typed_url name is not associated to any sync id. diff --git a/chrome/browser/sync/sync_setup_flow.cc b/chrome/browser/sync/sync_setup_flow.cc index f59dae0..a6dd5ec 100644 --- a/chrome/browser/sync/sync_setup_flow.cc +++ b/chrome/browser/sync/sync_setup_flow.cc @@ -345,6 +345,10 @@ void SyncSetupFlow::GetDialogSize(gfx::Size* size) const { #endif } +std::string SyncSetupFlow::GetDialogArgs() const { + return dialog_start_args_; +} + // A callback to notify the delegate that the dialog closed. void SyncSetupFlow::OnDialogClosed(const std::string& json_retval) { DCHECK(json_retval.empty()); @@ -385,6 +389,18 @@ void SyncSetupFlow::OnDialogClosed(const std::string& json_retval) { delete this; } +std::wstring SyncSetupFlow::GetDialogTitle() const { + return l10n_util::GetString(IDS_SYNC_MY_BOOKMARKS_LABEL); +} + +bool SyncSetupFlow::IsDialogModal() const { + return false; +} + +bool SyncSetupFlow::ShouldShowDialogTitle() const { + return true; +} + // static void SyncSetupFlow::GetArgsForGaiaLogin(const ProfileSyncService* service, DictionaryValue* args) { @@ -596,6 +612,10 @@ void SyncSetupFlow::Focus() { #endif // defined(OS_MACOSX) } +GURL SyncSetupFlow::GetDialogContentURL() const { + return GURL("chrome://syncresources/setup"); +} + // static SyncSetupFlow* SyncSetupFlow::Run(ProfileSyncService* service, SyncSetupFlowContainer* container, diff --git a/chrome/browser/sync/sync_setup_flow.h b/chrome/browser/sync/sync_setup_flow.h index 7d64402..8bfc443 100644 --- a/chrome/browser/sync/sync_setup_flow.h +++ b/chrome/browser/sync/sync_setup_flow.h @@ -72,9 +72,7 @@ class SyncSetupFlow : public HtmlDialogUIDelegate { // HtmlDialogUIDelegate implementation. // Get the HTML file path for the content to load in the dialog. - virtual GURL GetDialogContentURL() const { - return GURL("chrome://syncresources/setup"); - } + virtual GURL GetDialogContentURL() const; // HtmlDialogUIDelegate implementation. virtual void GetDOMMessageHandlers( @@ -86,27 +84,21 @@ class SyncSetupFlow : public HtmlDialogUIDelegate { // HtmlDialogUIDelegate implementation. // Gets the JSON string input to use when opening the dialog. - virtual std::string GetDialogArgs() const { - return dialog_start_args_; - } + virtual std::string GetDialogArgs() const; // HtmlDialogUIDelegate implementation. // A callback to notify the delegate that the dialog closed. virtual void OnDialogClosed(const std::string& json_retval); // HtmlDialogUIDelegate implementation. - virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } + virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) {} // HtmlDialogUIDelegate implementation. - virtual std::wstring GetDialogTitle() const { - return l10n_util::GetString(IDS_SYNC_MY_BOOKMARKS_LABEL); - } + virtual std::wstring GetDialogTitle() const; // HtmlDialogUIDelegate implementation. - virtual bool IsDialogModal() const { - return false; - } - virtual bool ShouldShowDialogTitle() const { return true; } + virtual bool IsDialogModal() const; + virtual bool ShouldShowDialogTitle() const; void OnUserSubmittedAuth(const std::string& username, const std::string& password, diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc index 96ed7af..1904d38 100644 --- a/chrome/browser/tab_contents/background_contents.cc +++ b/chrome/browser/tab_contents/background_contents.cc @@ -147,6 +147,14 @@ gfx::NativeWindow BackgroundContents::GetMessageBoxRootWindow() { return NULL; } +TabContents* BackgroundContents::AsTabContents() { + return NULL; +} + +ExtensionHost* BackgroundContents::AsExtensionHost() { + return NULL; +} + void BackgroundContents::UpdateInspectorSetting(const std::string& key, const std::string& value) { Profile* profile = render_view_host_->process()->profile(); diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h index 3e2f307..ad5780016 100644 --- a/chrome/browser/tab_contents/background_contents.h +++ b/chrome/browser/tab_contents/background_contents.h @@ -129,8 +129,8 @@ class BackgroundContents : public RenderViewHostDelegate, const std::wstring& prompt); virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {} virtual gfx::NativeWindow GetMessageBoxRootWindow(); - virtual TabContents* AsTabContents() { return NULL; } - virtual ExtensionHost* AsExtensionHost() { return NULL; } + virtual TabContents* AsTabContents(); + virtual ExtensionHost* AsExtensionHost(); virtual void UpdateInspectorSetting(const std::string& key, const std::string& value); diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index bc9920b..2219523 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -463,6 +463,10 @@ void InterstitialPage::Proceed() { } } +std::string InterstitialPage::GetHTMLContents() { + return std::string(); +} + void InterstitialPage::DontProceed() { DCHECK(action_taken_ != DONT_PROCEED_ACTION); @@ -529,6 +533,10 @@ void InterstitialPage::FocusThroughTabTraversal(bool reverse) { render_view_host_->SetInitialFocus(reverse); } +ViewType::Type InterstitialPage::GetRenderViewType() const { + return ViewType::INTERSTITIAL_PAGE; +} + void InterstitialPage::Disable() { enabled_ = false; } diff --git a/chrome/browser/tab_contents/interstitial_page.h b/chrome/browser/tab_contents/interstitial_page.h index 2faad77..3592a9d 100644 --- a/chrome/browser/tab_contents/interstitial_page.h +++ b/chrome/browser/tab_contents/interstitial_page.h @@ -70,7 +70,7 @@ class InterstitialPage : public NotificationObserver, static InterstitialPage* GetInterstitialPage(TabContents* tab_contents); // Sub-classes should return the HTML that should be displayed in the page. - virtual std::string GetHTMLContents() { return std::string(); } + virtual std::string GetHTMLContents(); // Reverts to the page showing before the interstitial. // Sub-classes should call this method when the user has chosen NOT to proceed @@ -101,9 +101,7 @@ class InterstitialPage : public NotificationObserver, // Called when tab traversing. void FocusThroughTabTraversal(bool reverse); - virtual ViewType::Type GetRenderViewType() const { - return ViewType::INTERSTITIAL_PAGE; - } + virtual ViewType::Type GetRenderViewType() const; virtual int GetBrowserWindowID() const; // See description above field. diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc index d4821bd..4d71d27 100644 --- a/chrome/browser/worker_host/worker_process_host.cc +++ b/chrome/browser/worker_host/worker_process_host.cc @@ -439,6 +439,10 @@ void WorkerProcessHost::SenderShutdown(IPC::Message::Sender* sender) { } } +bool WorkerProcessHost::CanShutdown() { + return instances_.empty(); +} + void WorkerProcessHost::UpdateTitle() { std::set<std::string> titles; for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) { diff --git a/chrome/browser/worker_host/worker_process_host.h b/chrome/browser/worker_host/worker_process_host.h index f00e1d0..f8adca0d 100644 --- a/chrome/browser/worker_host/worker_process_host.h +++ b/chrome/browser/worker_host/worker_process_host.h @@ -185,7 +185,7 @@ class WorkerProcessHost : public BrowserChildProcessHost { int route_id, CallbackWithReturnValue<int>::Type* next_route_id); - virtual bool CanShutdown() { return instances_.empty(); } + virtual bool CanShutdown(); // Updates the title shown in the task manager. void UpdateTitle(); diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index e6ff6f8..277496b 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -203,6 +203,7 @@ 'browser/autofill/form_structure.h', 'browser/autofill/home_address.cc', 'browser/autofill/home_address.h', + 'browser/autofill/home_phone_number.cc', 'browser/autofill/home_phone_number.h', 'browser/autofill/name_field.cc', 'browser/autofill/name_field.h', @@ -838,6 +839,7 @@ 'browser/diagnostics/diagnostics_main.h', 'browser/diagnostics/diagnostics_model.h', 'browser/diagnostics/diagnostics_model.cc', + 'browser/diagnostics/diagnostics_test.cc', 'browser/diagnostics/diagnostics_test.h', 'browser/diagnostics/sqlite_diagnostics.cc', 'browser/diagnostics/sqlite_diagnostics.h', diff --git a/chrome/common/json_pref_store.h b/chrome/common/json_pref_store.h index 84a73c9..a587ba0e 100644 --- a/chrome/common/json_pref_store.h +++ b/chrome/common/json_pref_store.h @@ -49,7 +49,7 @@ class JsonPrefStore : public PersistentPrefStore, private: // ImportantFileWriter::DataSerializer overrides: - bool SerializeData(std::string* output); + virtual bool SerializeData(std::string* output); FilePath path_; diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 285211b..a7f2495 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -494,6 +494,14 @@ void RenderThread::WidgetRestored() { idle_timer_.Stop(); } +bool RenderThread::IsExtensionProcess() const { + return is_extension_process_; +} + +bool RenderThread::IsIncognitoProcess() const { + return is_incognito_process_; +} + void RenderThread::DoNotSuspendWebKitSharedTimer() { suspend_webkit_shared_timer_ = false; } diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h index adfc65e..2bd59db 100644 --- a/chrome/renderer/render_thread.h +++ b/chrome/renderer/render_thread.h @@ -163,8 +163,8 @@ class RenderThread : public RenderThreadBase, virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); virtual void WidgetHidden(); virtual void WidgetRestored(); - virtual bool IsExtensionProcess() const { return is_extension_process_; } - virtual bool IsIncognitoProcess() const { return is_incognito_process_; } + virtual bool IsExtensionProcess() const; + virtual bool IsIncognitoProcess() const; // These methods modify how the next message is sent. Normally, when sending // a synchronous message that runs a nested message loop, we need to suspend diff --git a/chrome/renderer/translate_helper.cc b/chrome/renderer/translate_helper.cc index a630f51..6535c91 100644 --- a/chrome/renderer/translate_helper.cc +++ b/chrome/renderer/translate_helper.cc @@ -229,6 +229,10 @@ std::string TranslateHelper::GetOriginalPageLanguage() { return lang; } +bool TranslateHelper::DontDelayTasks() { + return false; +} + //////////////////////////////////////////////////////////////////////////////// // TranslateHelper, private: // diff --git a/chrome/renderer/translate_helper.h b/chrome/renderer/translate_helper.h index 04c623e..60a0bf5 100644 --- a/chrome/renderer/translate_helper.h +++ b/chrome/renderer/translate_helper.h @@ -82,7 +82,7 @@ class TranslateHelper { // Used in unit-tests. Makes the various tasks be posted immediately so that // the tests don't have to wait before checking states. - virtual bool DontDelayTasks() { return false; } + virtual bool DontDelayTasks(); private: // Checks if the current running page translation is finished or errored and diff --git a/media/filters/bitstream_converter.cc b/media/filters/bitstream_converter.cc index 45a19ab..a64f2a9 100644 --- a/media/filters/bitstream_converter.cc +++ b/media/filters/bitstream_converter.cc @@ -9,6 +9,14 @@ namespace media { +bool IdentityBitstreamConverter::Initialize() { + return true; +} + +bool IdentityBitstreamConverter::ConvertPacket(AVPacket* packet) { + return true; +} + FFmpegBitstreamConverter::FFmpegBitstreamConverter( const std::string& filter_name, AVCodecContext* stream_context) diff --git a/media/filters/bitstream_converter.h b/media/filters/bitstream_converter.h index 4f6a0d7..f19e3f2 100644 --- a/media/filters/bitstream_converter.h +++ b/media/filters/bitstream_converter.h @@ -41,8 +41,8 @@ class IdentityBitstreamConverter : public BitstreamConverter { IdentityBitstreamConverter() {} virtual ~IdentityBitstreamConverter() {} - virtual bool Initialize() { return true; } - virtual bool ConvertPacket(AVPacket* packet) { return true; } + virtual bool Initialize(); + virtual bool ConvertPacket(AVPacket* packet); private: DISALLOW_COPY_AND_ASSIGN(IdentityBitstreamConverter); diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index 3024050..7c4f763 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -149,6 +149,10 @@ void FFmpegDemuxerStream::Stop() { stopped_ = true; } +base::TimeDelta FFmpegDemuxerStream::duration() { + return duration_; +} + const MediaFormat& FFmpegDemuxerStream::media_format() { return media_format_; } @@ -219,6 +223,10 @@ void FFmpegDemuxerStream::EnableBitstreamConverter() { } } +AVStream* FFmpegDemuxerStream::GetAVStream() { + return stream_; +} + // static base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp( const AVRational& time_base, int64 timestamp) { diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h index 023f4ad..8187b17 100644 --- a/media/filters/ffmpeg_demuxer.h +++ b/media/filters/ffmpeg_demuxer.h @@ -69,7 +69,7 @@ class FFmpegDemuxerStream : public DemuxerStream, public AVStreamProvider { virtual void Stop(); // Returns the duration of this stream. - virtual base::TimeDelta duration() { return duration_; } + virtual base::TimeDelta duration(); // DemuxerStream implementation. virtual const MediaFormat& media_format(); @@ -78,7 +78,7 @@ class FFmpegDemuxerStream : public DemuxerStream, public AVStreamProvider { virtual void EnableBitstreamConverter(); // AVStreamProvider implementation. - virtual AVStream* GetAVStream() { return stream_; } + virtual AVStream* GetAVStream(); diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc index 1629e78..b3c21b944 100644 --- a/media/filters/ffmpeg_video_decoder.cc +++ b/media/filters/ffmpeg_video_decoder.cc @@ -291,6 +291,10 @@ void FFmpegVideoDecoder::OnReadCompleteTask(scoped_refptr<Buffer> buffer) { decode_engine_->ConsumeVideoSample(buffer); } +const MediaFormat& FFmpegVideoDecoder::media_format() { + return media_format_; +} + void FFmpegVideoDecoder::ProduceVideoFrame( scoped_refptr<VideoFrame> video_frame) { if (MessageLoop::current() != message_loop()) { diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h index 550c592..617dfc1 100644 --- a/media/filters/ffmpeg_video_decoder.h +++ b/media/filters/ffmpeg_video_decoder.h @@ -37,7 +37,7 @@ class FFmpegVideoDecoder : public VideoDecoder, // Decoder implementation. virtual void Initialize(DemuxerStream* demuxer_stream, FilterCallback* callback); - virtual const MediaFormat& media_format() { return media_format_; } + virtual const MediaFormat& media_format(); virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> video_frame); virtual bool ProvidesBuffer(); diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc index d8fbf04..15ba4f1 100644 --- a/media/filters/omx_video_decoder.cc +++ b/media/filters/omx_video_decoder.cc @@ -220,6 +220,10 @@ bool OmxVideoDecoder::ProvidesBuffer() { return info_.provides_buffers; } +const MediaFormat& OmxVideoDecoder::media_format() { + return media_format_; +} + void OmxVideoDecoder::DemuxCompleteTask(Buffer* buffer) { // We simply delicate the buffer to the right message loop. scoped_refptr<Buffer> ref_buffer = buffer; diff --git a/media/filters/omx_video_decoder.h b/media/filters/omx_video_decoder.h index 1814c29..7eb8504 100644 --- a/media/filters/omx_video_decoder.h +++ b/media/filters/omx_video_decoder.h @@ -33,7 +33,7 @@ class OmxVideoDecoder : public VideoDecoder, virtual void Seek(base::TimeDelta time, FilterCallback* callback); virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame); virtual bool ProvidesBuffer(); - virtual const MediaFormat& media_format() { return media_format_; } + virtual const MediaFormat& media_format(); private: // VideoDecodeEngine::EventHandler interface. diff --git a/media/video/ffmpeg_video_decode_engine.cc b/media/video/ffmpeg_video_decode_engine.cc index a2009f4..f52cf16 100644 --- a/media/video/ffmpeg_video_decode_engine.cc +++ b/media/video/ffmpeg_video_decode_engine.cc @@ -331,6 +331,14 @@ void FFmpegVideoDecodeEngine::Seek() { event_handler_->OnSeekComplete(); } +AVCodecContext* FFmpegVideoDecodeEngine::codec_context() const { + return codec_context_; +} + +void FFmpegVideoDecodeEngine::SetCodecContextForTest(AVCodecContext* context) { + codec_context_ = context; +} + void FFmpegVideoDecodeEngine::ReadInput() { DCHECK_EQ(output_eos_reached_, false); pending_input_buffers_++; diff --git a/media/video/ffmpeg_video_decode_engine.h b/media/video/ffmpeg_video_decode_engine.h index a7ce4e4..53baa54 100644 --- a/media/video/ffmpeg_video_decode_engine.h +++ b/media/video/ffmpeg_video_decode_engine.h @@ -36,11 +36,9 @@ class FFmpegVideoDecodeEngine : public VideoDecodeEngine { virtual void Flush(); virtual void Seek(); - virtual AVCodecContext* codec_context() const { return codec_context_; } + virtual AVCodecContext* codec_context() const; - virtual void SetCodecContextForTest(AVCodecContext* context) { - codec_context_ = context; - } + virtual void SetCodecContextForTest(AVCodecContext* context); VideoFrame::Format GetSurfaceFormat() const; private: diff --git a/media/video/omx_video_decode_engine.cc b/media/video/omx_video_decode_engine.cc index 1ffdf40..9ca3089 100644 --- a/media/video/omx_video_decode_engine.cc +++ b/media/video/omx_video_decode_engine.cc @@ -276,6 +276,10 @@ void OmxVideoDecodeEngine::Seek() { event_handler_->OnSeekComplete(); } +int OmxVideoDecodeEngine::current_omx_spec_version() const { + return 0x00000101; +} + VideoFrame::Format OmxVideoDecodeEngine::GetSurfaceFormat() const { // TODO(jiesun): Both OmxHeaderType and EGLImage surface type could have // different surface formats. diff --git a/media/video/omx_video_decode_engine.h b/media/video/omx_video_decode_engine.h index 86cabe9..9a6c0a7 100644 --- a/media/video/omx_video_decode_engine.h +++ b/media/video/omx_video_decode_engine.h @@ -36,7 +36,7 @@ class OmxVideoDecodeEngine : public VideoDecodeEngine { virtual void Seek(); // Subclass can provide a different value. - virtual int current_omx_spec_version() const { return 0x00000101; } + virtual int current_omx_spec_version() const; private: enum OmxIlState { diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc index 5e548cf..3867df1 100644 --- a/net/proxy/proxy_config_service_linux.cc +++ b/net/proxy/proxy_config_service_linux.cc @@ -1255,4 +1255,16 @@ ProxyConfigServiceLinux::ProxyConfigServiceLinux( : delegate_(new Delegate(env_var_getter, gconf_getter)) { } +void ProxyConfigServiceLinux::AddObserver(Observer* observer) { + delegate_->AddObserver(observer); +} + +void ProxyConfigServiceLinux::RemoveObserver(Observer* observer) { + delegate_->RemoveObserver(observer); +} + +bool ProxyConfigServiceLinux::GetLatestProxyConfig(ProxyConfig* config) { + return delegate_->GetLatestProxyConfig(config); +} + } // namespace net diff --git a/net/proxy/proxy_config_service_linux.h b/net/proxy/proxy_config_service_linux.h index 07bf8fa..fa6c52d 100644 --- a/net/proxy/proxy_config_service_linux.h +++ b/net/proxy/proxy_config_service_linux.h @@ -237,18 +237,9 @@ class ProxyConfigServiceLinux : public ProxyConfigService { // ProxyConfigService methods: // Called from IO thread. - - virtual void AddObserver(Observer* observer) { - delegate_->AddObserver(observer); - } - - virtual void RemoveObserver(Observer* observer) { - delegate_->RemoveObserver(observer); - } - - virtual bool GetLatestProxyConfig(ProxyConfig* config) { - return delegate_->GetLatestProxyConfig(config); - } + virtual void AddObserver(Observer* observer); + virtual void RemoveObserver(Observer* observer); + virtual bool GetLatestProxyConfig(ProxyConfig* config); private: scoped_refptr<Delegate> delegate_; diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc index f73b558..f2d2efe 100644 --- a/net/socket/socks5_client_socket.cc +++ b/net/socket/socks5_client_socket.cc @@ -106,6 +106,10 @@ bool SOCKS5ClientSocket::IsConnectedAndIdle() const { return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); } +const BoundNetLog& SOCKS5ClientSocket::NetLog() const { + return net_log_; +} + void SOCKS5ClientSocket::SetSubresourceSpeculation() { if (transport_.get() && transport_->socket()) { transport_->socket()->SetSubresourceSpeculation(); diff --git a/net/socket/socks5_client_socket.h b/net/socket/socks5_client_socket.h index 5a918cc..e26b6c1 100644 --- a/net/socket/socks5_client_socket.h +++ b/net/socket/socks5_client_socket.h @@ -55,7 +55,7 @@ class SOCKS5ClientSocket : public ClientSocket { virtual void Disconnect(); virtual bool IsConnected() const; virtual bool IsConnectedAndIdle() const; - virtual const BoundNetLog& NetLog() const { return net_log_; } + virtual const BoundNetLog& NetLog() const; virtual void SetSubresourceSpeculation(); virtual void SetOmniboxSpeculation(); virtual bool WasEverUsed() const; diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc index a4a7391..a8da6c4 100644 --- a/net/socket/socks_client_socket.cc +++ b/net/socket/socks_client_socket.cc @@ -140,6 +140,10 @@ bool SOCKSClientSocket::IsConnectedAndIdle() const { return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); } +const BoundNetLog& SOCKSClientSocket::NetLog() const { + return net_log_; +} + void SOCKSClientSocket::SetSubresourceSpeculation() { if (transport_.get() && transport_->socket()) { transport_->socket()->SetSubresourceSpeculation(); diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h index 86511cf..fc9a5c0 100644 --- a/net/socket/socks_client_socket.h +++ b/net/socket/socks_client_socket.h @@ -52,7 +52,7 @@ class SOCKSClientSocket : public ClientSocket { virtual void Disconnect(); virtual bool IsConnected() const; virtual bool IsConnectedAndIdle() const; - virtual const BoundNetLog& NetLog() const { return net_log_; } + virtual const BoundNetLog& NetLog() const; virtual void SetSubresourceSpeculation(); virtual void SetOmniboxSpeculation(); virtual bool WasEverUsed() const; diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc index bb4784a..713fce3 100644 --- a/net/socket/ssl_client_socket_nss.cc +++ b/net/socket/ssl_client_socket_nss.cc @@ -949,6 +949,10 @@ int SSLClientSocketNSS::GetPeerAddress(AddressList* address) const { return transport_->socket()->GetPeerAddress(address); } +const BoundNetLog& SSLClientSocketNSS::NetLog() const { + return net_log_; +} + void SSLClientSocketNSS::SetSubresourceSpeculation() { if (transport_.get() && transport_->socket()) { transport_->socket()->SetSubresourceSpeculation(); diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h index 0b371d7..8798361 100644 --- a/net/socket/ssl_client_socket_nss.h +++ b/net/socket/ssl_client_socket_nss.h @@ -63,7 +63,7 @@ class SSLClientSocketNSS : public SSLClientSocket { virtual bool IsConnected() const; virtual bool IsConnectedAndIdle() const; virtual int GetPeerAddress(AddressList* address) const; - virtual const BoundNetLog& NetLog() const { return net_log_; } + virtual const BoundNetLog& NetLog() const; virtual void SetSubresourceSpeculation(); virtual void SetOmniboxSpeculation(); virtual bool WasEverUsed() const; diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc index 1cddb5e..a6d209b 100644 --- a/net/spdy/spdy_proxy_client_socket.cc +++ b/net/spdy/spdy_proxy_client_socket.cc @@ -108,6 +108,10 @@ bool SpdyProxyClientSocket::IsConnectedAndIdle() const { return IsConnected() && !spdy_stream_->is_idle(); } +const BoundNetLog& SpdyProxyClientSocket::NetLog() const { + return net_log_; +} + void SpdyProxyClientSocket::SetSubresourceSpeculation() { // TODO(rch): what should this implementation be? } diff --git a/net/spdy/spdy_proxy_client_socket.h b/net/spdy/spdy_proxy_client_socket.h index 5f2dd6f..2becc75 100644 --- a/net/spdy/spdy_proxy_client_socket.h +++ b/net/spdy/spdy_proxy_client_socket.h @@ -66,7 +66,7 @@ class SpdyProxyClientSocket : public ClientSocket, public SpdyStream::Delegate { virtual void Disconnect(); virtual bool IsConnected() const; virtual bool IsConnectedAndIdle() const; - virtual const BoundNetLog& NetLog() const { return net_log_; } + virtual const BoundNetLog& NetLog() const; virtual void SetSubresourceSpeculation(); virtual void SetOmniboxSpeculation(); virtual bool WasEverUsed() const; diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc index 6eb09e0..ea9b23c 100644 --- a/net/url_request/url_request_ftp_job.cc +++ b/net/url_request/url_request_ftp_job.cc @@ -121,6 +121,10 @@ void URLRequestFtpJob::CancelAuth() { &URLRequestFtpJob::OnStartCompleted, OK)); } +uint64 URLRequestFtpJob::GetUploadProgress() const { + return 0; +} + bool URLRequestFtpJob::ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read) { diff --git a/net/url_request/url_request_ftp_job.h b/net/url_request/url_request_ftp_job.h index 58d0efb..d503766 100644 --- a/net/url_request/url_request_ftp_job.h +++ b/net/url_request/url_request_ftp_job.h @@ -48,7 +48,7 @@ class URLRequestFtpJob : public URLRequestJob { virtual void CancelAuth(); // TODO(ibrar): Yet to give another look at this function. - virtual uint64 GetUploadProgress() const { return 0; } + virtual uint64 GetUploadProgress() const; virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read); void StartTransaction(); diff --git a/webkit/glue/plugins/pepper_class.h b/webkit/glue/plugins/pepper_class.h index 35bd2c4..b2365a2 100644 --- a/webkit/glue/plugins/pepper_class.h +++ b/webkit/glue/plugins/pepper_class.h @@ -40,7 +40,7 @@ class VarObjectClass : public Resource { virtual ~VarObjectClass(); // Resource override. - virtual VarObjectClass* AsVarObjectClass() { return this; } + virtual VarObjectClass* AsVarObjectClass(); const PropertyMap &properties() const { return properties_; } diff --git a/webkit/glue/plugins/pepper_plugin_object.cc b/webkit/glue/plugins/pepper_plugin_object.cc index 2705809..47fbcaf 100644 --- a/webkit/glue/plugins/pepper_plugin_object.cc +++ b/webkit/glue/plugins/pepper_plugin_object.cc @@ -884,4 +884,8 @@ const PPB_Class* VarObjectClass::GetInterface() { // virtual VarObjectClass::~VarObjectClass() { } +VarObjectClass* VarObjectClass::AsVarObjectClass() { + return this; +} + } // namespace pepper diff --git a/webkit/glue/plugins/plugin_group.cc b/webkit/glue/plugins/plugin_group.cc index 723a31d..668621d 100644 --- a/webkit/glue/plugins/plugin_group.cc +++ b/webkit/glue/plugins/plugin_group.cc @@ -79,6 +79,8 @@ VersionRange& VersionRange::operator=(const VersionRange& other) { return *this; } +VersionRange::~VersionRange() {} + void VersionRange::InitFrom(const VersionRange& other) { low_str = other.low_str; high_str = other.high_str; diff --git a/webkit/glue/plugins/plugin_group.h b/webkit/glue/plugins/plugin_group.h index e916b84..a771238 100644 --- a/webkit/glue/plugins/plugin_group.h +++ b/webkit/glue/plugins/plugin_group.h @@ -51,6 +51,7 @@ struct VersionRange { explicit VersionRange(VersionRangeDefinition definition); VersionRange(const VersionRange& other); VersionRange& operator=(const VersionRange& other); + ~VersionRange(); std::string low_str; std::string high_str; diff --git a/webkit/glue/plugins/plugin_stream_url.cc b/webkit/glue/plugins/plugin_stream_url.cc index a16845b..7f9f355 100644 --- a/webkit/glue/plugins/plugin_stream_url.cc +++ b/webkit/glue/plugins/plugin_stream_url.cc @@ -39,6 +39,10 @@ bool PluginStreamUrl::Close(NPReason reason) { return result; } +webkit_glue::WebPluginResourceClient* PluginStreamUrl::AsResourceClient() { + return static_cast<webkit_glue::WebPluginResourceClient*>(this); +} + void PluginStreamUrl::WillSendRequest(const GURL& url, int http_status_code) { if (notify_needed()) { // If the plugin participates in HTTP url redirect handling then notify it. diff --git a/webkit/glue/plugins/plugin_stream_url.h b/webkit/glue/plugins/plugin_stream_url.h index 3fdbe17..8642897 100644 --- a/webkit/glue/plugins/plugin_stream_url.h +++ b/webkit/glue/plugins/plugin_stream_url.h @@ -34,9 +34,7 @@ class PluginStreamUrl : public PluginStream, // it is still loading. virtual bool Close(NPReason reason); - virtual webkit_glue::WebPluginResourceClient* AsResourceClient() { - return static_cast<webkit_glue::WebPluginResourceClient*>(this); - } + virtual webkit_glue::WebPluginResourceClient* AsResourceClient(); virtual void CancelRequest(); diff --git a/webkit/glue/plugins/webplugin_2d_device_delegate.cc b/webkit/glue/plugins/webplugin_2d_device_delegate.cc new file mode 100644 index 0000000..f971e20 --- /dev/null +++ b/webkit/glue/plugins/webplugin_2d_device_delegate.cc @@ -0,0 +1,53 @@ +// 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_2d_device_delegate.h" + +namespace webkit_glue { + +NPError WebPlugin2DDeviceDelegate::Device2DQueryCapability(int32 capability, + int32* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DQueryConfig( + const NPDeviceContext2DConfig* request, + NPDeviceContext2DConfig* obtain) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DInitializeContext( + const NPDeviceContext2DConfig* config, + NPDeviceContext2D* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DSetStateContext( + NPDeviceContext2D* context, + int32 state, + intptr_t value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DGetStateContext( + NPDeviceContext2D* context, + int32 state, + intptr_t* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DFlushContext( + NPP id, + NPDeviceContext2D* context, + NPDeviceFlushContextCallbackPtr callback, + void* user_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DDestroyContext( + NPDeviceContext2D* context) { + return NPERR_GENERIC_ERROR; +} + +} // namespace webkit_glue diff --git a/webkit/glue/plugins/webplugin_2d_device_delegate.h b/webkit/glue/plugins/webplugin_2d_device_delegate.h index 69bd53a..e18c2fd 100644 --- a/webkit/glue/plugins/webplugin_2d_device_delegate.h +++ b/webkit/glue/plugins/webplugin_2d_device_delegate.h @@ -15,37 +15,23 @@ namespace webkit_glue { // "regular" plugin delegate while being overridden by the "pepper" one. class WebPlugin2DDeviceDelegate { public: - virtual NPError Device2DQueryCapability(int32 capability, int32* value) { - return NPERR_GENERIC_ERROR; - } + virtual NPError Device2DQueryCapability(int32 capability, int32* value); virtual NPError Device2DQueryConfig(const NPDeviceContext2DConfig* request, - NPDeviceContext2DConfig* obtain) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext2DConfig* obtain); virtual NPError Device2DInitializeContext( const NPDeviceContext2DConfig* config, - NPDeviceContext2D* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext2D* context); virtual NPError Device2DSetStateContext(NPDeviceContext2D* context, int32 state, - intptr_t value) { - return NPERR_GENERIC_ERROR; - } + intptr_t value); virtual NPError Device2DGetStateContext(NPDeviceContext2D* context, int32 state, - intptr_t* value) { - return NPERR_GENERIC_ERROR; - } + intptr_t* value); virtual NPError Device2DFlushContext(NPP id, NPDeviceContext2D* context, NPDeviceFlushContextCallbackPtr callback, - void* user_data) { - return NPERR_GENERIC_ERROR; - } - virtual NPError Device2DDestroyContext(NPDeviceContext2D* context) { - return NPERR_GENERIC_ERROR; - } + void* user_data); + virtual NPError Device2DDestroyContext(NPDeviceContext2D* context); protected: WebPlugin2DDeviceDelegate() {} diff --git a/webkit/glue/plugins/webplugin_3d_device_delegate.cc b/webkit/glue/plugins/webplugin_3d_device_delegate.cc new file mode 100644 index 0000000..93dffa6 --- /dev/null +++ b/webkit/glue/plugins/webplugin_3d_device_delegate.cc @@ -0,0 +1,110 @@ +// 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_3d_device_delegate.h" + +namespace webkit_glue { + +NPError WebPlugin3DDeviceDelegate::Device3DQueryCapability(int32 capability, + int32* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DQueryConfig( + const NPDeviceContext3DConfig* request, + NPDeviceContext3DConfig* obtain) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DInitializeContext( + const NPDeviceContext3DConfig* config, + NPDeviceContext3D* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DSetStateContext( + NPDeviceContext3D* context, + int32 state, + intptr_t value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DGetStateContext( + NPDeviceContext3D* context, + int32 state, + intptr_t* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DFlushContext( + NPP id, + NPDeviceContext3D* context, + NPDeviceFlushContextCallbackPtr callback, + void* user_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DDestroyContext( + NPDeviceContext3D* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DCreateBuffer(NPDeviceContext3D* context, + size_t size, + int32* id) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DDestroyBuffer( + NPDeviceContext3D* context, + int32 id) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DMapBuffer(NPDeviceContext3D* context, + int32 id, + NPDeviceBuffer* buffer) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DGetNumConfigs(int32* num_configs) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DGetConfigAttribs( + int32 config, + int32* attrib_list) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DCreateContext( + int32 config, + const int32* attrib_list, + NPDeviceContext3D** context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DRegisterCallback( + NPP id, + NPDeviceContext* context, + int32 callback_type, + NPDeviceGenericCallbackPtr callback, + void* callback_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DSynchronizeContext( + NPP id, + NPDeviceContext3D* context, + NPDeviceSynchronizationMode mode, + const int32* input_attrib_list, + int32* output_attrib_list, + NPDeviceSynchronizeContextCallbackPtr callback, + void* callback_data) { + return NPERR_GENERIC_ERROR; +} + + +} // namespace webkit_glue + diff --git a/webkit/glue/plugins/webplugin_3d_device_delegate.h b/webkit/glue/plugins/webplugin_3d_device_delegate.h index fbb46eb..2f64b45 100644 --- a/webkit/glue/plugins/webplugin_3d_device_delegate.h +++ b/webkit/glue/plugins/webplugin_3d_device_delegate.h @@ -15,71 +15,43 @@ namespace webkit_glue { // "regular" plugin delegate while being overridden by the "pepper" one. class WebPlugin3DDeviceDelegate { public: - virtual NPError Device3DQueryCapability(int32 capability, int32* value) { - return NPERR_GENERIC_ERROR; - } + virtual NPError Device3DQueryCapability(int32 capability, int32* value); virtual NPError Device3DQueryConfig(const NPDeviceContext3DConfig* request, - NPDeviceContext3DConfig* obtain) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext3DConfig* obtain); virtual NPError Device3DInitializeContext( const NPDeviceContext3DConfig* config, - NPDeviceContext3D* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext3D* context); virtual NPError Device3DSetStateContext(NPDeviceContext3D* context, int32 state, - intptr_t value) { - return NPERR_GENERIC_ERROR; - } + intptr_t value); virtual NPError Device3DGetStateContext(NPDeviceContext3D* context, int32 state, - intptr_t* value) { - return NPERR_GENERIC_ERROR; - } + intptr_t* value); virtual NPError Device3DFlushContext(NPP id, NPDeviceContext3D* context, NPDeviceFlushContextCallbackPtr callback, - void* user_data) { - return NPERR_GENERIC_ERROR; - } - virtual NPError Device3DDestroyContext(NPDeviceContext3D* context) { - return NPERR_GENERIC_ERROR; - } + void* user_data); + virtual NPError Device3DDestroyContext(NPDeviceContext3D* context); virtual NPError Device3DCreateBuffer(NPDeviceContext3D* context, size_t size, - int32* id) { - return NPERR_GENERIC_ERROR; - } + int32* id); virtual NPError Device3DDestroyBuffer(NPDeviceContext3D* context, - int32 id) { - return NPERR_GENERIC_ERROR; - } + int32 id); virtual NPError Device3DMapBuffer(NPDeviceContext3D* context, int32 id, - NPDeviceBuffer* buffer) { - return NPERR_GENERIC_ERROR; - } - virtual NPError Device3DGetNumConfigs(int32* num_configs) { - return NPERR_GENERIC_ERROR; - } + NPDeviceBuffer* buffer); + virtual NPError Device3DGetNumConfigs(int32* num_configs); virtual NPError Device3DGetConfigAttribs(int32 config, - int32* attrib_list) { - return NPERR_GENERIC_ERROR; - } + int32* attrib_list); virtual NPError Device3DCreateContext(int32 config, const int32* attrib_list, - NPDeviceContext3D** context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext3D** context); virtual NPError Device3DRegisterCallback( NPP id, NPDeviceContext* context, int32 callback_type, NPDeviceGenericCallbackPtr callback, - void* callback_data) { - return NPERR_GENERIC_ERROR; - } + void* callback_data); virtual NPError Device3DSynchronizeContext( NPP id, NPDeviceContext3D* context, @@ -87,9 +59,7 @@ class WebPlugin3DDeviceDelegate { const int32* input_attrib_list, int32* output_attrib_list, NPDeviceSynchronizeContextCallbackPtr callback, - void* callback_data) { - return NPERR_GENERIC_ERROR; - } + void* callback_data); protected: WebPlugin3DDeviceDelegate() {} diff --git a/webkit/glue/plugins/webplugin_audio_device_delegate.cc b/webkit/glue/plugins/webplugin_audio_device_delegate.cc new file mode 100644 index 0000000..8cc3d62 --- /dev/null +++ b/webkit/glue/plugins/webplugin_audio_device_delegate.cc @@ -0,0 +1,50 @@ +// 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_audio_device_delegate.h" + +namespace webkit_glue { + +NPError WebPluginAudioDeviceDelegate::DeviceAudioQueryCapability( + int32 capability, int32* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioQueryConfig( + const NPDeviceContextAudioConfig* request, + NPDeviceContextAudioConfig* obtain) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioInitializeContext( + const NPDeviceContextAudioConfig* config, + NPDeviceContextAudio* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioSetStateContext( + NPDeviceContextAudio* context, + int32 state, intptr_t value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioGetStateContext( + NPDeviceContextAudio* context, + int32 state, intptr_t* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioFlushContext( + NPP id, NPDeviceContextAudio* context, + NPDeviceFlushContextCallbackPtr callback, void* user_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioDestroyContext( + NPDeviceContextAudio* context) { + return NPERR_GENERIC_ERROR; +} + + +} // namespace webkit_glue diff --git a/webkit/glue/plugins/webplugin_audio_device_delegate.h b/webkit/glue/plugins/webplugin_audio_device_delegate.h index 3f37246..de85433 100644 --- a/webkit/glue/plugins/webplugin_audio_device_delegate.h +++ b/webkit/glue/plugins/webplugin_audio_device_delegate.h @@ -15,35 +15,21 @@ namespace webkit_glue { // "regular" plugin delegate while being overridden by the "pepper" one. class WebPluginAudioDeviceDelegate { public: - virtual NPError DeviceAudioQueryCapability(int32 capability, int32* value) { - return NPERR_GENERIC_ERROR; - } + virtual NPError DeviceAudioQueryCapability(int32 capability, int32* value); virtual NPError DeviceAudioQueryConfig( const NPDeviceContextAudioConfig* request, - NPDeviceContextAudioConfig* obtain) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContextAudioConfig* obtain); virtual NPError DeviceAudioInitializeContext( const NPDeviceContextAudioConfig* config, - NPDeviceContextAudio* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContextAudio* context); virtual NPError DeviceAudioSetStateContext(NPDeviceContextAudio* context, - int32 state, intptr_t value) { - return NPERR_GENERIC_ERROR; - } + int32 state, intptr_t value); virtual NPError DeviceAudioGetStateContext(NPDeviceContextAudio* context, - int32 state, intptr_t* value) { - return NPERR_GENERIC_ERROR; - } + int32 state, intptr_t* value); virtual NPError DeviceAudioFlushContext( NPP id, NPDeviceContextAudio* context, - NPDeviceFlushContextCallbackPtr callback, void* user_data) { - return NPERR_GENERIC_ERROR; - } - virtual NPError DeviceAudioDestroyContext(NPDeviceContextAudio* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceFlushContextCallbackPtr callback, void* user_data); + virtual NPError DeviceAudioDestroyContext(NPDeviceContextAudio* context); protected: WebPluginAudioDeviceDelegate() {} diff --git a/webkit/glue/plugins/webplugin_delegate.cc b/webkit/glue/plugins/webplugin_delegate.cc new file mode 100644 index 0000000..c3fb53b --- /dev/null +++ b/webkit/glue/plugins/webplugin_delegate.cc @@ -0,0 +1,40 @@ +// 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_delegate.h" + +namespace webkit_glue { + +bool WebPluginDelegate::StartFind(const string16& search_text, + bool case_sensitive, + int identifier) { + return false; +} + +NPWidgetExtensions* WebPluginDelegate::GetWidgetExtensions() { + return NULL; +} + +bool WebPluginDelegate::SetCursor(NPCursorType type) { + return false; +} + +NPFontExtensions* WebPluginDelegate::GetFontExtensions() { + return NULL; +} + +bool WebPluginDelegate::HasSelection() const { + return false; +} + +string16 WebPluginDelegate::GetSelectionAsText() const { + return string16(); +} + +string16 WebPluginDelegate::GetSelectionAsMarkup() const { + return string16(); +} + + +} // namespace webkit_glue diff --git a/webkit/glue/plugins/webplugin_delegate.h b/webkit/glue/plugins/webplugin_delegate.h index 901cdea..ac7bb5c 100644 --- a/webkit/glue/plugins/webplugin_delegate.h +++ b/webkit/glue/plugins/webplugin_delegate.h @@ -143,22 +143,22 @@ class WebPluginDelegate : public WebPlugin2DDeviceDelegate, // See WebPluginContainerImpl's description of the interface. virtual bool StartFind(const string16& search_text, bool case_sensitive, - int identifier) { return false; } + int identifier); virtual void SelectFindResult(bool forward) {} virtual void StopFind() {} virtual void NumberOfFindResultsChanged(int total, bool final_result) {} virtual void SelectedFindResultChanged(int index) {} - virtual NPWidgetExtensions* GetWidgetExtensions() { return NULL; } - virtual bool SetCursor(NPCursorType type) { return false; } - virtual NPFontExtensions* GetFontExtensions() { return NULL; } + virtual NPWidgetExtensions* GetWidgetExtensions(); + virtual bool SetCursor(NPCursorType type); + virtual NPFontExtensions* GetFontExtensions(); // Used for zooming of full page plugins. 0 means reset, while -1 means zoom // out and +1 means zoom in. virtual void SetZoomFactor(float scale, bool text_only) {} // Gets the selected text, if any. - virtual bool HasSelection() const { return false; } - virtual string16 GetSelectionAsText() const { return string16(); } - virtual string16 GetSelectionAsMarkup() const { return string16(); } + virtual bool HasSelection() const; + virtual string16 GetSelectionAsText() const; + virtual string16 GetSelectionAsMarkup() const; }; } // namespace webkit_glue diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index 83aeb2e..5292fbe 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -297,9 +297,14 @@ 'plugins/webview_plugin.h', 'plugins/webplugin.cc', 'plugins/webplugin.h', + 'plugins/webplugin_audio_device_delegate.cc', + 'plugins/webplugin_audio_device_delegate.h', + 'plugins/webplugin_2d_device_delegate.cc', 'plugins/webplugin_2d_device_delegate.h', + 'plugins/webplugin_3d_device_delegate.cc', 'plugins/webplugin_3d_device_delegate.h', 'plugins/webplugin_accelerated_surface_mac.h', + 'plugins/webplugin_delegate.cc', 'plugins/webplugin_delegate.h', 'plugins/webplugin_delegate_impl.cc', 'plugins/webplugin_delegate_impl.h', |