summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/app_base.gypi1
-rw-r--r--app/multi_animation.cc4
-rw-r--r--app/multi_animation.h2
-rw-r--r--app/tree_model.cc16
-rw-r--r--app/tree_model.h8
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.h2
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc8
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_gtk.h4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.h2
-rw-r--r--chrome/browser/autofill/credit_card.cc4
-rw-r--r--chrome/browser/autofill/credit_card.h2
-rw-r--r--chrome/browser/autofill/fax_number.cc33
-rw-r--r--chrome/browser/autofill/fax_number.h30
-rw-r--r--chrome/browser/autofill/form_field.cc4
-rw-r--r--chrome/browser/autofill/form_field.h2
-rw-r--r--chrome/browser/autofill/home_address.cc41
-rw-r--r--chrome/browser/autofill/home_address.h39
-rw-r--r--chrome/browser/autofill/name_field.cc11
-rw-r--r--chrome/browser/autofill/name_field.h9
-rw-r--r--chrome/browser/autofill/personal_data_manager.cc12
-rw-r--r--chrome/browser/autofill/personal_data_manager.h10
-rw-r--r--chrome/browser/bookmarks/base_bookmark_model_observer.cc51
-rw-r--r--chrome/browser/bookmarks/base_bookmark_model_observer.h29
-rw-r--r--chrome/browser/cookies_tree_model.cc116
-rw-r--r--chrome/browser/cookies_tree_model.h108
-rw-r--r--chrome/browser/debugger/devtools_client_host.cc16
-rw-r--r--chrome/browser/debugger/devtools_client_host.h9
-rw-r--r--chrome/browser/debugger/devtools_remote_listen_socket.cc4
-rw-r--r--chrome/browser/debugger/devtools_remote_listen_socket.h2
-rw-r--r--chrome/browser/debugger/devtools_window.cc4
-rw-r--r--chrome/browser/debugger/devtools_window.h2
-rw-r--r--chrome/browser/dom_ui/history_ui.cc4
-rw-r--r--chrome/browser/dom_ui/history_ui.h4
-rw-r--r--chrome/browser/download/download_shelf.cc4
-rw-r--r--chrome/browser/download/download_shelf.h2
-rw-r--r--chrome/browser/extensions/extension_host.cc16
-rw-r--r--chrome/browser/extensions/extension_host.h10
-rw-r--r--chrome/browser/extensions/extensions_service.cc20
-rw-r--r--chrome/browser/extensions/extensions_service.h16
-rw-r--r--chrome/browser/gtk/browser_actions_toolbar_gtk.cc14
-rw-r--r--chrome/browser/gtk/browser_actions_toolbar_gtk.h8
-rw-r--r--chrome/browser/plugin_process_host.cc4
-rw-r--r--chrome/browser/plugin_process_host.h2
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc4
-rw-r--r--chrome/browser/renderer_host/render_view_host.h2
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc10
-rw-r--r--chrome/browser/renderer_host/render_widget_host.h6
-rw-r--r--chrome/browser/sidebar/sidebar_container.cc5
-rw-r--r--chrome/browser/sidebar/sidebar_container.h2
-rw-r--r--chrome/browser/sync/engine/model_changing_syncer_command.cc5
-rw-r--r--chrome/browser/sync/engine/model_changing_syncer_command.h4
-rw-r--r--chrome/browser/sync/engine/net/server_connection_manager.cc4
-rw-r--r--chrome/browser/sync/engine/net/server_connection_manager.h4
-rw-r--r--chrome/browser/sync/engine/syncer_thread.cc20
-rw-r--r--chrome/browser/sync/engine/syncer_thread.h20
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc6
-rw-r--r--chrome/browser/sync/glue/session_model_associator.h6
-rw-r--r--chrome/browser/sync/glue/ui_model_worker.cc4
-rw-r--r--chrome/browser/sync/glue/ui_model_worker.h2
-rw-r--r--chrome/browser/sync/profile_sync_service.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service.h4
-rw-r--r--chrome/browser/tab_closeable_state_watcher.cc8
-rw-r--r--chrome/browser/tab_closeable_state_watcher.h8
-rw-r--r--chrome/browser/tab_contents/background_contents.cc12
-rw-r--r--chrome/browser/tab_contents/background_contents.h6
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.cc96
-rw-r--r--chrome/browser/tab_contents/infobar_delegate.h79
-rw-r--r--chrome/browser/themes/browser_theme_provider.cc4
-rw-r--r--chrome/browser/themes/browser_theme_provider.h2
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc4
-rw-r--r--chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h2
-rw-r--r--chrome/browser/utility_process_host.cc10
-rw-r--r--chrome/browser/utility_process_host.h6
-rw-r--r--chrome/chrome.gyp1
-rw-r--r--chrome/chrome_browser.gypi4
-rw-r--r--chrome/common/json_pref_store.cc4
-rw-r--r--chrome/common/json_pref_store.h2
-rw-r--r--chrome/common/metrics_helpers.cc4
-rw-r--r--chrome/common/metrics_helpers.h4
-rw-r--r--chrome/service/service_utility_process_host.cc4
-rw-r--r--chrome/service/service_utility_process_host.h2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc5
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.h4
-rw-r--r--gpu/command_buffer/service/shader_translator.cc18
-rw-r--r--gpu/command_buffer/service/shader_translator.h9
-rw-r--r--media/filters/video_renderer_base.cc4
-rw-r--r--media/filters/video_renderer_base.h4
-rw-r--r--net/base/host_resolver_impl.cc4
-rw-r--r--net/base/host_resolver_impl.h2
-rw-r--r--net/http/http_auth_controller.cc8
-rw-r--r--net/http/http_auth_controller.h8
-rw-r--r--net/http/http_proxy_client_socket.cc4
-rw-r--r--net/http/http_proxy_client_socket.h2
-rw-r--r--net/http/http_proxy_client_socket_pool.cc12
-rw-r--r--net/http/http_proxy_client_socket_pool.h12
-rw-r--r--net/socket/ssl_client_socket_pool.cc12
-rw-r--r--net/socket/ssl_client_socket_pool.h12
-rw-r--r--net/url_request/url_request_http_job.cc4
-rw-r--r--net/url_request/url_request_http_job.h2
-rw-r--r--ppapi/proxy/image_data.cc4
-rw-r--r--ppapi/proxy/image_data.h2
-rw-r--r--ppapi/proxy/plugin_resource.cc3
-rw-r--r--ppapi/proxy/plugin_resource.h8
-rw-r--r--remoting/jingle_glue/ssl_socket_adapter.cc4
-rw-r--r--remoting/jingle_glue/ssl_socket_adapter.h2
-rw-r--r--skia/ext/vector_platform_device_linux.cc12
-rw-r--r--skia/ext/vector_platform_device_linux.h8
-rw-r--r--webkit/appcache/appcache_url_request_job.cc4
-rw-r--r--webkit/appcache/appcache_url_request_job.h4
-rw-r--r--webkit/glue/media/buffered_data_source.cc20
-rw-r--r--webkit/glue/media/buffered_data_source.h10
-rw-r--r--webkit/glue/plugins/pepper_graphics_2d.cc4
-rw-r--r--webkit/glue/plugins/pepper_graphics_2d.h2
-rw-r--r--webkit/glue/plugins/pepper_graphics_3d.cc4
-rw-r--r--webkit/glue/plugins/pepper_graphics_3d.h4
-rw-r--r--webkit/glue/plugins/pepper_image_data.cc4
-rw-r--r--webkit/glue/plugins/pepper_image_data.h2
-rw-r--r--webkit/glue/plugins/pepper_resource.cc5
-rw-r--r--webkit/glue/plugins/pepper_resource.h3
-rw-r--r--webkit/glue/plugins/pepper_transport.cc4
-rw-r--r--webkit/glue/plugins/pepper_transport.h4
-rw-r--r--webkit/glue/plugins/pepper_var.cc12
-rw-r--r--webkit/glue/plugins/pepper_var.h6
-rw-r--r--webkit/glue/plugins/plugin_stream.cc4
-rw-r--r--webkit/glue/plugins/plugin_stream.h4
-rw-r--r--webkit/glue/webmediaplayer_impl.cc8
-rw-r--r--webkit/glue/webmediaplayer_impl.h8
129 files changed, 949 insertions, 407 deletions
diff --git a/app/app_base.gypi b/app/app_base.gypi
index e14623c..dad6f9e 100644
--- a/app/app_base.gypi
+++ b/app/app_base.gypi
@@ -26,6 +26,7 @@
'system_monitor_mac.mm',
'system_monitor_posix.cc',
'system_monitor_win.cc',
+ 'tree_model.cc',
'tree_model.h',
'tree_node_iterator.h',
'tree_node_model.h',
diff --git a/app/multi_animation.cc b/app/multi_animation.cc
index 6001a2a..f43470e 100644
--- a/app/multi_animation.cc
+++ b/app/multi_animation.cc
@@ -31,6 +31,10 @@ MultiAnimation::MultiAnimation(const Parts& parts)
MultiAnimation::~MultiAnimation() {}
+double MultiAnimation::GetCurrentValue() const {
+ return current_value_;
+}
+
void MultiAnimation::Step(base::TimeTicks time_now) {
double last_value = current_value_;
size_t last_index = current_part_index_;
diff --git a/app/multi_animation.h b/app/multi_animation.h
index 0f4b38c..f565000 100644
--- a/app/multi_animation.h
+++ b/app/multi_animation.h
@@ -53,7 +53,7 @@ class MultiAnimation : public Animation {
// Returns the current value. The current value for a MultiAnimation is
// determined from the tween type of the current part.
- virtual double GetCurrentValue() const { return current_value_; }
+ virtual double GetCurrentValue() const;
// Returns the index of the current part.
size_t current_part_index() const { return current_part_index_; }
diff --git a/app/tree_model.cc b/app/tree_model.cc
new file mode 100644
index 0000000..39d2d44
--- /dev/null
+++ b/app/tree_model.cc
@@ -0,0 +1,16 @@
+// 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 "app/tree_model.h"
+
+#include "base/logging.h"
+
+void TreeModel::SetTitle(TreeModelNode* node,
+ const string16& title) {
+ NOTREACHED();
+}
+
+int TreeModel::GetIconIndex(TreeModelNode* node) {
+ return -1;
+}
diff --git a/app/tree_model.h b/app/tree_model.h
index df06b9f..a4ac06f 100644
--- a/app/tree_model.h
+++ b/app/tree_model.h
@@ -8,7 +8,6 @@
#include <vector>
-#include "base/logging.h"
#include "base/string16.h"
class SkBitmap;
@@ -78,10 +77,7 @@ class TreeModel {
// Sets the title of the specified node.
// This is only invoked if the node is editable and the user edits a node.
- virtual void SetTitle(TreeModelNode* node,
- const string16& title) {
- NOTREACHED();
- }
+ virtual void SetTitle(TreeModelNode* node, const string16& title);
// Returns the set of icons for the nodes in the tree. You only need override
// this if you don't want to use the default folder icons.
@@ -90,7 +86,7 @@ class TreeModel {
// Returns the index of the icon to use for |node|. Return -1 to use the
// default icon. The index is relative to the list of icons returned from
// GetIcons.
- virtual int GetIconIndex(TreeModelNode* node) { return -1; }
+ virtual int GetIconIndex(TreeModelNode* node);
protected:
virtual ~TreeModel() {}
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 8d31941..37de68d 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -36,6 +36,10 @@
///////////////////////////////////////////////////////////////////////////////
// AutocompleteEditController
+bool AutocompleteEditController::AcceptCurrentInstantPreview() {
+ return false;
+}
+
AutocompleteEditController::~AutocompleteEditController() {
}
diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h
index 983a5f5..4f0b5d8 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.h
+++ b/chrome/browser/autocomplete/autocomplete_edit.h
@@ -52,7 +52,7 @@ class AutocompleteEditController {
// Accepts the currently showing instant preview, if any, and returns true.
// Returns false if there is no instant preview showing.
- virtual bool AcceptCurrentInstantPreview() { return false; }
+ virtual bool AcceptCurrentInstantPreview();
// Sets the suggested search text to |suggested_text|.
virtual void OnSetSuggestedSearchText(const string16& suggested_text) = 0;
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
index ca70f1b..77b207a 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
@@ -462,6 +462,14 @@ gfx::Font AutocompleteEditViewGtk::GetFont() {
rc_style->font_desc : text_view_->style->font_desc);
}
+AutocompleteEditModel* AutocompleteEditViewGtk::model() {
+ return model_.get();
+}
+
+const AutocompleteEditModel* AutocompleteEditViewGtk::model() const {
+ return model_.get();
+}
+
void AutocompleteEditViewGtk::SaveStateToTab(TabContents* tab) {
DCHECK(tab);
// If any text has been selected, register it as the PRIMARY selection so it
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
index 21f4a93..66c7541 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
@@ -93,8 +93,8 @@ class AutocompleteEditViewGtk : public AutocompleteEditView,
gfx::Font GetFont();
// Implement the AutocompleteEditView interface.
- virtual AutocompleteEditModel* model() { return model_.get(); }
- virtual const AutocompleteEditModel* model() const { return model_.get(); }
+ virtual AutocompleteEditModel* model();
+ virtual const AutocompleteEditModel* model() const;
virtual void SaveStateToTab(TabContents* tab);
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
index 8068c11..e7da263 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
@@ -337,6 +337,10 @@ AutocompletePopupViewGtk::~AutocompletePopupViewGtk() {
g_object_unref(it->second);
}
+bool AutocompletePopupViewGtk::IsOpen() const {
+ return opened_;
+}
+
void AutocompletePopupViewGtk::InvalidateLine(size_t line) {
// TODO(deanm): Is it possible to use some constant for the width, instead
// of having to query the width of the window?
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
index 590cc41..0632635 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
@@ -35,7 +35,7 @@ class AutocompletePopupViewGtk : public AutocompletePopupView,
~AutocompletePopupViewGtk();
// Overridden from AutocompletePopupView:
- virtual bool IsOpen() const { return opened_; }
+ virtual bool IsOpen() const;
virtual void InvalidateLine(size_t line);
virtual void UpdatePopupAppearance();
virtual gfx::Rect GetTargetBounds();
diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc
index 1cd0c13..e8e0191 100644
--- a/chrome/browser/autofill/credit_card.cc
+++ b/chrome/browser/autofill/credit_card.cc
@@ -337,6 +337,10 @@ void CreditCard::SetInfo(const AutoFillType& type, const string16& value) {
}
}
+const string16 CreditCard::Label() const {
+ return label_;
+}
+
string16 CreditCard::ObfuscatedNumber() const {
if (number().empty())
return string16(); // No CC number, means empty preview.
diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h
index 9136b5e..ebb3161 100644
--- a/chrome/browser/autofill/credit_card.h
+++ b/chrome/browser/autofill/credit_card.h
@@ -32,7 +32,7 @@ class CreditCard : public FormGroup {
virtual string16 GetFieldText(const AutoFillType& type) const;
virtual string16 GetPreviewText(const AutoFillType& type) const;
virtual void SetInfo(const AutoFillType& type, const string16& value);
- virtual const string16 Label() const { return label_; }
+ virtual const string16 Label() const;
// The number altered for display, for example: ******1234
string16 ObfuscatedNumber() const;
diff --git a/chrome/browser/autofill/fax_number.cc b/chrome/browser/autofill/fax_number.cc
new file mode 100644
index 0000000..06dd781
--- /dev/null
+++ b/chrome/browser/autofill/fax_number.cc
@@ -0,0 +1,33 @@
+// 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/fax_number.h"
+
+FaxNumber::FaxNumber() {}
+
+FaxNumber::~FaxNumber() {}
+
+FormGroup* FaxNumber::Clone() const {
+ return new FaxNumber(*this);
+}
+
+AutoFillFieldType FaxNumber::GetNumberType() const {
+ return PHONE_FAX_NUMBER;
+}
+
+AutoFillFieldType FaxNumber::GetCityCodeType() const {
+ return PHONE_FAX_CITY_CODE;
+}
+
+AutoFillFieldType FaxNumber::GetCountryCodeType() const {
+ return PHONE_FAX_COUNTRY_CODE;
+}
+
+AutoFillFieldType FaxNumber::GetCityAndNumberType() const {
+ return PHONE_FAX_CITY_AND_NUMBER;
+}
+
+AutoFillFieldType FaxNumber::GetWholeNumberType() const {
+ return PHONE_FAX_WHOLE_NUMBER;
+}
diff --git a/chrome/browser/autofill/fax_number.h b/chrome/browser/autofill/fax_number.h
index 864746f..7fe9a1c 100644
--- a/chrome/browser/autofill/fax_number.h
+++ b/chrome/browser/autofill/fax_number.h
@@ -12,29 +12,17 @@ class FormGroup;
class FaxNumber : public PhoneNumber {
public:
- FaxNumber() {}
- virtual FormGroup* Clone() const { return new FaxNumber(*this); }
+ FaxNumber();
+ virtual ~FaxNumber();
- protected:
- virtual AutoFillFieldType GetNumberType() const {
- return PHONE_FAX_NUMBER;
- }
-
- virtual AutoFillFieldType GetCityCodeType() const {
- return PHONE_FAX_CITY_CODE;
- }
-
- virtual AutoFillFieldType GetCountryCodeType() const {
- return PHONE_FAX_COUNTRY_CODE;
- }
+ virtual FormGroup* Clone() const;
- virtual AutoFillFieldType GetCityAndNumberType() const {
- return PHONE_FAX_CITY_AND_NUMBER;
- }
-
- virtual AutoFillFieldType GetWholeNumberType() const {
- return PHONE_FAX_WHOLE_NUMBER;
- }
+ protected:
+ virtual AutoFillFieldType GetNumberType() const;
+ virtual AutoFillFieldType GetCityCodeType() const;
+ virtual AutoFillFieldType GetCountryCodeType() const;
+ virtual AutoFillFieldType GetCityAndNumberType() const;
+ virtual AutoFillFieldType GetWholeNumberType() const;
private:
explicit FaxNumber(const FaxNumber& phone) : PhoneNumber(phone) {}
diff --git a/chrome/browser/autofill/form_field.cc b/chrome/browser/autofill/form_field.cc
index 95b1e55..6bf3e24 100644
--- a/chrome/browser/autofill/form_field.cc
+++ b/chrome/browser/autofill/form_field.cc
@@ -105,6 +105,10 @@ class EmailField : public FormField {
AutoFillField* field_;
};
+FormFieldType FormField::GetFormFieldType() const {
+ return kOtherFieldType;
+}
+
// static
bool FormField::Match(AutoFillField* field,
const string16& pattern,
diff --git a/chrome/browser/autofill/form_field.h b/chrome/browser/autofill/form_field.h
index 38b2ec2..4c5e02b 100644
--- a/chrome/browser/autofill/form_field.h
+++ b/chrome/browser/autofill/form_field.h
@@ -75,7 +75,7 @@ class FormField {
virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const = 0;
// Returns the type of form field of the class implementing this interface.
- virtual FormFieldType GetFormFieldType() const { return kOtherFieldType; }
+ virtual FormFieldType GetFormFieldType() const;
// Returns true if |field| contains the regexp |pattern| in the name or label.
// If |match_label_only| is true, then only the field's label is considered.
diff --git a/chrome/browser/autofill/home_address.cc b/chrome/browser/autofill/home_address.cc
new file mode 100644
index 0000000..5c036a1
--- /dev/null
+++ b/chrome/browser/autofill/home_address.cc
@@ -0,0 +1,41 @@
+// 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_address.h"
+
+HomeAddress::HomeAddress() {}
+
+HomeAddress::~HomeAddress() {}
+
+FormGroup* HomeAddress::Clone() const {
+ return new HomeAddress(*this);
+}
+
+AutoFillFieldType HomeAddress::GetLine1Type() const {
+ return ADDRESS_HOME_LINE1;
+}
+
+AutoFillFieldType HomeAddress::GetLine2Type() const {
+ return ADDRESS_HOME_LINE2;
+}
+
+AutoFillFieldType HomeAddress::GetAptNumType() const {
+ return ADDRESS_HOME_APT_NUM;
+}
+
+AutoFillFieldType HomeAddress::GetCityType() const {
+ return ADDRESS_HOME_CITY;
+}
+
+AutoFillFieldType HomeAddress::GetStateType() const {
+ return ADDRESS_HOME_STATE;
+}
+
+AutoFillFieldType HomeAddress::GetZipCodeType() const {
+ return ADDRESS_HOME_ZIP;
+}
+
+AutoFillFieldType HomeAddress::GetCountryType() const {
+ return ADDRESS_HOME_COUNTRY;
+}
diff --git a/chrome/browser/autofill/home_address.h b/chrome/browser/autofill/home_address.h
index 3984f6b..9f441f5 100644
--- a/chrome/browser/autofill/home_address.h
+++ b/chrome/browser/autofill/home_address.h
@@ -14,37 +14,18 @@ class FormGroup;
// A specialization of Address that identifies itself as a home address.
class HomeAddress : public Address {
public:
- HomeAddress() {}
- virtual FormGroup* Clone() const { return new HomeAddress(*this); }
+ HomeAddress();
+ virtual ~HomeAddress();
+ virtual FormGroup* Clone() const;
protected:
- virtual AutoFillFieldType GetLine1Type() const {
- return ADDRESS_HOME_LINE1;
- }
-
- virtual AutoFillFieldType GetLine2Type() const {
- return ADDRESS_HOME_LINE2;
- }
-
- virtual AutoFillFieldType GetAptNumType() const {
- return ADDRESS_HOME_APT_NUM;
- }
-
- virtual AutoFillFieldType GetCityType() const {
- return ADDRESS_HOME_CITY;
- }
-
- virtual AutoFillFieldType GetStateType() const {
- return ADDRESS_HOME_STATE;
- }
-
- virtual AutoFillFieldType GetZipCodeType() const {
- return ADDRESS_HOME_ZIP;
- }
-
- virtual AutoFillFieldType GetCountryType() const {
- return ADDRESS_HOME_COUNTRY;
- }
+ virtual AutoFillFieldType GetLine1Type() const;
+ virtual AutoFillFieldType GetLine2Type() const;
+ virtual AutoFillFieldType GetAptNumType() const;
+ virtual AutoFillFieldType GetCityType() const;
+ virtual AutoFillFieldType GetStateType() const;
+ virtual AutoFillFieldType GetZipCodeType() const;
+ virtual AutoFillFieldType GetCountryType() const;
private:
explicit HomeAddress(const HomeAddress& address) : Address(address) {}
diff --git a/chrome/browser/autofill/name_field.cc b/chrome/browser/autofill/name_field.cc
index 8163d7a..69a7b43 100644
--- a/chrome/browser/autofill/name_field.cc
+++ b/chrome/browser/autofill/name_field.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/autofill/name_field.h"
+#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -18,6 +19,12 @@ NameField* NameField::Parse(std::vector<AutoFillField*>::const_iterator* iter,
return field;
}
+bool FullNameField::GetFieldInfo(FieldTypeMap* field_type_map) const {
+ bool ok = Add(field_type_map, field_, AutoFillType(NAME_FULL));
+ DCHECK(ok);
+ return true;
+}
+
FullNameField* FullNameField::Parse(
std::vector<AutoFillField*>::const_iterator* iter) {
// Exclude labels containing the string "username", which typically
@@ -37,6 +44,10 @@ FullNameField* FullNameField::Parse(
return NULL;
}
+FullNameField::FullNameField(AutoFillField* field)
+ : field_(field) {
+}
+
FirstLastNameField* FirstLastNameField::Parse1(
std::vector<AutoFillField*>::const_iterator* iter) {
// Some pages (e.g. Overstock_comBilling.html, SmithsonianCheckout.html)
diff --git a/chrome/browser/autofill/name_field.h b/chrome/browser/autofill/name_field.h
index 7b16e77..0c6bd09 100644
--- a/chrome/browser/autofill/name_field.h
+++ b/chrome/browser/autofill/name_field.h
@@ -8,7 +8,6 @@
#include <vector>
-#include "base/logging.h"
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/form_field.h"
@@ -28,17 +27,13 @@ class NameField : public FormField {
// A form field that can parse a full name field.
class FullNameField : public NameField {
public:
- virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const {
- bool ok = Add(field_type_map, field_, AutoFillType(NAME_FULL));
- DCHECK(ok);
- return true;
- }
+ virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const;
static FullNameField* Parse(
std::vector<AutoFillField*>::const_iterator* iter);
private:
- explicit FullNameField(AutoFillField* field) : field_(field) {}
+ explicit FullNameField(AutoFillField* field);
AutoFillField* field_;
DISALLOW_COPY_AND_ASSIGN(FullNameField);
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index 09506b9..8554064 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -589,6 +589,10 @@ bool PersonalDataManager::HasPassword() {
return !password_hash_.empty();
}
+bool PersonalDataManager::IsDataLoaded() const {
+ return is_data_loaded_;
+}
+
const std::vector<AutoFillProfile*>& PersonalDataManager::profiles() {
// |profile_| is NULL in AutoFillManagerTest.
bool auxiliary_profiles_enabled = profile_ ? profile_->GetPrefs()->GetBoolean(
@@ -611,6 +615,14 @@ const std::vector<AutoFillProfile*>& PersonalDataManager::profiles() {
return profiles_;
}
+const std::vector<AutoFillProfile*>& PersonalDataManager::web_profiles() {
+ return web_profiles_.get();
+}
+
+const std::vector<CreditCard*>& PersonalDataManager::credit_cards() {
+ return credit_cards_.get();
+}
+
AutoFillProfile* PersonalDataManager::CreateNewEmptyAutoFillProfileForDBThread(
const string16& label) {
// See comment in header for thread details.
diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h
index babbe42..f6f9df8 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -132,19 +132,15 @@ class PersonalDataManager
bool HasPassword();
// Returns whether the personal data has been loaded from the web database.
- virtual bool IsDataLoaded() const { return is_data_loaded_; }
+ virtual bool IsDataLoaded() const;
// This PersonalDataManager owns these profiles and credit cards. Their
// lifetime is until the web database is updated with new profile and credit
// card information, respectively. |profiles()| returns both web and
// auxiliary profiles. |web_profiles()| returns only web profiles.
const std::vector<AutoFillProfile*>& profiles();
- virtual const std::vector<AutoFillProfile*>& web_profiles() {
- return web_profiles_.get();
- }
- virtual const std::vector<CreditCard*>& credit_cards() {
- return credit_cards_.get();
- }
+ virtual const std::vector<AutoFillProfile*>& web_profiles();
+ virtual const std::vector<CreditCard*>& credit_cards();
// Creates a profile labeled |label|.
// This must be called on the DB thread with the expectation that the
diff --git a/chrome/browser/bookmarks/base_bookmark_model_observer.cc b/chrome/browser/bookmarks/base_bookmark_model_observer.cc
new file mode 100644
index 0000000..dfa4ba6
--- /dev/null
+++ b/chrome/browser/bookmarks/base_bookmark_model_observer.cc
@@ -0,0 +1,51 @@
+// 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/bookmarks/base_bookmark_model_observer.h"
+
+void BaseBookmarkModelObserver::Loaded(BookmarkModel* model) {
+}
+
+void BaseBookmarkModelObserver::BookmarkModelBeingDeleted(
+ BookmarkModel* model) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeMoved(
+ BookmarkModel* model,
+ const BookmarkNode* old_parent,
+ int old_index,
+ const BookmarkNode* new_parent,
+ int new_index) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeAdded(BookmarkModel* model,
+ const BookmarkNode* parent,
+ int index) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeRemoved(BookmarkModel* model,
+ const BookmarkNode* parent,
+ int old_index,
+ const BookmarkNode* node) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeChanged(BookmarkModel* model,
+ const BookmarkNode* node) {
+ BookmarkModelChanged();
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeFavIconLoaded(
+ BookmarkModel* model,
+ const BookmarkNode* node) {
+}
+
+void BaseBookmarkModelObserver::BookmarkNodeChildrenReordered(
+ BookmarkModel* model,
+ const BookmarkNode* node) {
+ BookmarkModelChanged();
+}
diff --git a/chrome/browser/bookmarks/base_bookmark_model_observer.h b/chrome/browser/bookmarks/base_bookmark_model_observer.h
index 5a306aa..ff561af 100644
--- a/chrome/browser/bookmarks/base_bookmark_model_observer.h
+++ b/chrome/browser/bookmarks/base_bookmark_model_observer.h
@@ -18,40 +18,27 @@ class BaseBookmarkModelObserver : public BookmarkModelObserver {
virtual void BookmarkModelChanged() = 0;
- virtual void Loaded(BookmarkModel* model) {}
+ virtual void Loaded(BookmarkModel* model);
- virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {
- BookmarkModelChanged();
- }
+ virtual void BookmarkModelBeingDeleted(BookmarkModel* model);
virtual void BookmarkNodeMoved(BookmarkModel* model,
const BookmarkNode* old_parent,
int old_index,
const BookmarkNode* new_parent,
- int new_index) {
- BookmarkModelChanged();
- }
+ int new_index);
virtual void BookmarkNodeAdded(BookmarkModel* model,
const BookmarkNode* parent,
- int index) {
- BookmarkModelChanged();
- }
+ int index);
virtual void BookmarkNodeRemoved(BookmarkModel* model,
const BookmarkNode* parent,
int old_index,
- const BookmarkNode* node) {
- BookmarkModelChanged();
- }
+ const BookmarkNode* node);
virtual void BookmarkNodeChanged(BookmarkModel* model,
- const BookmarkNode* node) {
- BookmarkModelChanged();
- }
+ const BookmarkNode* node);
virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model,
- const BookmarkNode* node) {
- }
+ const BookmarkNode* node);
virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,
- const BookmarkNode* node) {
- BookmarkModelChanged();
- }
+ const BookmarkNode* node);
private:
DISALLOW_COPY_AND_ASSIGN(BaseBookmarkModelObserver);
diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc
index 24e3c9a..ed3c8b4 100644
--- a/chrome/browser/cookies_tree_model.cc
+++ b/chrome/browser/cookies_tree_model.cc
@@ -51,6 +51,8 @@ CookieTreeCookieNode::CookieTreeCookieNode(
cookie_(cookie) {
}
+CookieTreeCookieNode::~CookieTreeCookieNode() {}
+
void CookieTreeCookieNode::DeleteStoredObjects() {
// notify CookieMonster that we should delete this cookie
// We have stored a copy of all the cookies in the model, and our model is
@@ -62,6 +64,12 @@ void CookieTreeCookieNode::DeleteStoredObjects() {
GetModel()->cookie_monster_->DeleteCanonicalCookie(*cookie_);
}
+CookieTreeNode::DetailedInfo CookieTreeCookieNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_COOKIE,
+ cookie_, NULL, NULL, NULL, NULL, NULL);
+}
+
namespace {
// comparison functor, for use in CookieTreeRootNode
class OriginNodeComparator {
@@ -136,6 +144,12 @@ void CookieTreeAppCacheNode::DeleteStoredObjects() {
appcache_info_->manifest_url);
}
+CookieTreeNode::DetailedInfo CookieTreeAppCacheNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_APPCACHE,
+ NULL, NULL, NULL, NULL, appcache_info_, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeDatabaseNode, public:
@@ -147,11 +161,19 @@ CookieTreeDatabaseNode::CookieTreeDatabaseNode(
database_info_(database_info) {
}
+CookieTreeDatabaseNode::~CookieTreeDatabaseNode() {}
+
void CookieTreeDatabaseNode::DeleteStoredObjects() {
GetModel()->database_helper_->DeleteDatabase(
database_info_->origin_identifier, database_info_->database_name);
}
+CookieTreeNode::DetailedInfo CookieTreeDatabaseNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_DATABASE,
+ NULL, database_info_, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeLocalStorageNode, public:
@@ -164,11 +186,20 @@ CookieTreeLocalStorageNode::CookieTreeLocalStorageNode(
local_storage_info_(local_storage_info) {
}
+CookieTreeLocalStorageNode::~CookieTreeLocalStorageNode() {}
+
void CookieTreeLocalStorageNode::DeleteStoredObjects() {
GetModel()->local_storage_helper_->DeleteLocalStorageFile(
local_storage_info_->file_path);
}
+CookieTreeNode::DetailedInfo
+CookieTreeLocalStorageNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_LOCAL_STORAGE,
+ NULL, NULL, local_storage_info_, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeSessionStorageNode, public:
@@ -181,6 +212,15 @@ CookieTreeSessionStorageNode::CookieTreeSessionStorageNode(
session_storage_info_(session_storage_info) {
}
+CookieTreeSessionStorageNode::~CookieTreeSessionStorageNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeSessionStorageNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_SESSION_STORAGE,
+ NULL, NULL, NULL, session_storage_info_, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeIndexedDBNode, public:
@@ -193,14 +233,28 @@ CookieTreeIndexedDBNode::CookieTreeIndexedDBNode(
indexed_db_info_(indexed_db_info) {
}
+CookieTreeIndexedDBNode::~CookieTreeIndexedDBNode() {}
+
void CookieTreeIndexedDBNode::DeleteStoredObjects() {
GetModel()->indexed_db_helper_->DeleteIndexedDBFile(
indexed_db_info_->file_path);
}
+CookieTreeNode::DetailedInfo CookieTreeIndexedDBNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetParent()->GetTitle(),
+ DetailedInfo::TYPE_INDEXED_DB,
+ NULL, NULL, NULL, NULL, NULL, indexed_db_info_);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeRootNode, public:
+CookieTreeRootNode::CookieTreeRootNode(CookiesTreeModel* model)
+ : model_(model) {
+}
+
+CookieTreeRootNode::~CookieTreeRootNode() {}
+
CookieTreeOriginNode* CookieTreeRootNode::GetOrCreateOriginNode(
const GURL& url) {
CookieTreeOriginNode origin_node(url);
@@ -224,6 +278,16 @@ CookieTreeOriginNode* CookieTreeRootNode::GetOrCreateOriginNode(
return retval;
}
+CookiesTreeModel* CookieTreeRootNode::GetModel() const {
+ return model_;
+}
+
+CookieTreeNode::DetailedInfo CookieTreeRootNode::GetDetailedInfo() const {
+ return DetailedInfo(string16(),
+ DetailedInfo::TYPE_ROOT,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeOriginNode, public:
@@ -322,6 +386,15 @@ CookieTreeCookiesNode::CookieTreeCookiesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIES)) {
}
+CookieTreeCookiesNode::~CookieTreeCookiesNode() {
+}
+
+CookieTreeNode::DetailedInfo CookieTreeCookiesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_COOKIES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeAppCachesNode, public:
@@ -330,6 +403,14 @@ CookieTreeAppCachesNode::CookieTreeAppCachesNode()
IDS_COOKIES_APPLICATION_CACHES)) {
}
+CookieTreeAppCachesNode::~CookieTreeAppCachesNode() {}
+
+CookieTreeNode::DetailedInfo CookieTreeAppCachesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_APPCACHES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeDatabasesNode, public:
@@ -337,6 +418,14 @@ CookieTreeDatabasesNode::CookieTreeDatabasesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASES)) {
}
+CookieTreeDatabasesNode::~CookieTreeDatabasesNode() {}
+
+CookieTreeNode::DetailedInfo CookieTreeDatabasesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_DATABASES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeLocalStoragesNode, public:
@@ -344,6 +433,15 @@ CookieTreeLocalStoragesNode::CookieTreeLocalStoragesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE)) {
}
+CookieTreeLocalStoragesNode::~CookieTreeLocalStoragesNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeLocalStoragesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_LOCAL_STORAGES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeSessionStoragesNode, public:
@@ -351,6 +449,15 @@ CookieTreeSessionStoragesNode::CookieTreeSessionStoragesNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_SESSION_STORAGE)) {
}
+CookieTreeSessionStoragesNode::~CookieTreeSessionStoragesNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeSessionStoragesNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_SESSION_STORAGES,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeIndexedDBsNode, public:
@@ -358,6 +465,15 @@ CookieTreeIndexedDBsNode::CookieTreeIndexedDBsNode()
: CookieTreeNode(l10n_util::GetStringUTF16(IDS_COOKIES_INDEXED_DB)) {
}
+CookieTreeIndexedDBsNode::~CookieTreeIndexedDBsNode() {}
+
+CookieTreeNode::DetailedInfo
+CookieTreeIndexedDBsNode::GetDetailedInfo() const {
+ return DetailedInfo(GetParent()->GetTitle(),
+ DetailedInfo::TYPE_INDEXED_DBS,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookieTreeNode, protected
diff --git a/chrome/browser/cookies_tree_model.h b/chrome/browser/cookies_tree_model.h
index 16e4050..20b2a71 100644
--- a/chrome/browser/cookies_tree_model.h
+++ b/chrome/browser/cookies_tree_model.h
@@ -162,20 +162,16 @@ class CookieTreeNode : public TreeNode<CookieTreeNode> {
// The node at the root of the CookieTree that gets inserted into the view.
class CookieTreeRootNode : public CookieTreeNode {
public:
- explicit CookieTreeRootNode(CookiesTreeModel* model) : model_(model) {}
- virtual ~CookieTreeRootNode() {}
+ explicit CookieTreeRootNode(CookiesTreeModel* model);
+ virtual ~CookieTreeRootNode();
CookieTreeOriginNode* GetOrCreateOriginNode(const GURL& url);
// CookieTreeNode methods:
- virtual CookiesTreeModel* GetModel() const { return model_; }
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(string16(),
- DetailedInfo::TYPE_ROOT,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
- private:
+ virtual CookiesTreeModel* GetModel() const;
+ virtual DetailedInfo GetDetailedInfo() const;
+ private:
CookiesTreeModel* model_;
DISALLOW_COPY_AND_ASSIGN(CookieTreeRootNode);
@@ -236,15 +232,11 @@ class CookieTreeCookieNode : public CookieTreeNode {
// Does not take ownership of cookie, and cookie should remain valid at least
// as long as the CookieTreeCookieNode is valid.
explicit CookieTreeCookieNode(net::CookieMonster::CanonicalCookie* cookie);
- virtual ~CookieTreeCookieNode() {}
+ virtual ~CookieTreeCookieNode();
// CookieTreeNode methods:
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_COOKIE,
- cookie_, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// Cookie_ is not owned by the node, and is expected to remain valid as long
@@ -257,13 +249,9 @@ class CookieTreeCookieNode : public CookieTreeNode {
class CookieTreeCookiesNode : public CookieTreeNode {
public:
CookieTreeCookiesNode();
- virtual ~CookieTreeCookiesNode() {}
+ virtual ~CookieTreeCookiesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_COOKIES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddCookieNode(CookieTreeCookieNode* child) {
AddChildSortedByTitle(child);
@@ -285,11 +273,7 @@ class CookieTreeAppCacheNode : public CookieTreeNode {
virtual ~CookieTreeAppCacheNode() {}
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_APPCACHE,
- NULL, NULL, NULL, NULL, appcache_info_, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
const appcache::AppCacheInfo* appcache_info_;
@@ -299,13 +283,9 @@ class CookieTreeAppCacheNode : public CookieTreeNode {
class CookieTreeAppCachesNode : public CookieTreeNode {
public:
CookieTreeAppCachesNode();
- virtual ~CookieTreeAppCachesNode() {}
+ virtual ~CookieTreeAppCachesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_APPCACHES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddAppCacheNode(CookieTreeAppCacheNode* child) {
AddChildSortedByTitle(child);
@@ -324,14 +304,10 @@ class CookieTreeDatabaseNode : public CookieTreeNode {
// valid at least as long as the CookieTreeDatabaseNode is valid.
explicit CookieTreeDatabaseNode(
BrowsingDataDatabaseHelper::DatabaseInfo* database_info);
- virtual ~CookieTreeDatabaseNode() {}
+ virtual ~CookieTreeDatabaseNode();
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_DATABASE,
- NULL, database_info_, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// database_info_ is not owned by the node, and is expected to remain
@@ -344,13 +320,9 @@ class CookieTreeDatabaseNode : public CookieTreeNode {
class CookieTreeDatabasesNode : public CookieTreeNode {
public:
CookieTreeDatabasesNode();
- virtual ~CookieTreeDatabasesNode() {}
+ virtual ~CookieTreeDatabasesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_DATABASES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddDatabaseNode(CookieTreeDatabaseNode* child) {
AddChildSortedByTitle(child);
@@ -369,15 +341,11 @@ class CookieTreeLocalStorageNode : public CookieTreeNode {
// valid.
explicit CookieTreeLocalStorageNode(
BrowsingDataLocalStorageHelper::LocalStorageInfo* local_storage_info);
- virtual ~CookieTreeLocalStorageNode() {}
+ virtual ~CookieTreeLocalStorageNode();
// CookieTreeNode methods:
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_LOCAL_STORAGE,
- NULL, NULL, local_storage_info_, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// local_storage_info_ is not owned by the node, and is expected to remain
@@ -390,13 +358,9 @@ class CookieTreeLocalStorageNode : public CookieTreeNode {
class CookieTreeLocalStoragesNode : public CookieTreeNode {
public:
CookieTreeLocalStoragesNode();
- virtual ~CookieTreeLocalStoragesNode() {}
+ virtual ~CookieTreeLocalStoragesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_LOCAL_STORAGES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddLocalStorageNode(CookieTreeLocalStorageNode* child) {
AddChildSortedByTitle(child);
@@ -416,14 +380,10 @@ class CookieTreeSessionStorageNode : public CookieTreeNode {
// is valid.
explicit CookieTreeSessionStorageNode(
BrowsingDataLocalStorageHelper::LocalStorageInfo* session_storage_info);
- virtual ~CookieTreeSessionStorageNode() {}
+ virtual ~CookieTreeSessionStorageNode();
// CookieTreeNode methods:
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_SESSION_STORAGE,
- NULL, NULL, NULL, session_storage_info_, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// session_storage_info_ is not owned by the node, and is expected to remain
@@ -436,13 +396,9 @@ class CookieTreeSessionStorageNode : public CookieTreeNode {
class CookieTreeSessionStoragesNode : public CookieTreeNode {
public:
CookieTreeSessionStoragesNode();
- virtual ~CookieTreeSessionStoragesNode() {}
+ virtual ~CookieTreeSessionStoragesNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_SESSION_STORAGES,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddSessionStorageNode(CookieTreeSessionStorageNode* child) {
AddChildSortedByTitle(child);
@@ -461,15 +417,11 @@ class CookieTreeIndexedDBNode : public CookieTreeNode {
// is valid.
explicit CookieTreeIndexedDBNode(
BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info);
- virtual ~CookieTreeIndexedDBNode() {}
+ virtual ~CookieTreeIndexedDBNode();
// CookieTreeNode methods:
virtual void DeleteStoredObjects();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetParent()->GetTitle(),
- DetailedInfo::TYPE_INDEXED_DB,
- NULL, NULL, NULL, NULL, NULL, indexed_db_info_);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
private:
// indexed_db_info_ is not owned by the node, and is expected to remain
@@ -482,13 +434,9 @@ class CookieTreeIndexedDBNode : public CookieTreeNode {
class CookieTreeIndexedDBsNode : public CookieTreeNode {
public:
CookieTreeIndexedDBsNode();
- virtual ~CookieTreeIndexedDBsNode() {}
+ virtual ~CookieTreeIndexedDBsNode();
- virtual DetailedInfo GetDetailedInfo() const {
- return DetailedInfo(GetParent()->GetTitle(),
- DetailedInfo::TYPE_INDEXED_DBS,
- NULL, NULL, NULL, NULL, NULL, NULL);
- }
+ virtual DetailedInfo GetDetailedInfo() const;
void AddIndexedDBNode(CookieTreeIndexedDBNode* child) {
AddChildSortedByTitle(child);
diff --git a/chrome/browser/debugger/devtools_client_host.cc b/chrome/browser/debugger/devtools_client_host.cc
new file mode 100644
index 0000000..f619bfb
--- /dev/null
+++ b/chrome/browser/debugger/devtools_client_host.cc
@@ -0,0 +1,16 @@
+// Copyright (c) 2009 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/debugger/devtools_client_host.h"
+
+DevToolsWindow* DevToolsClientHost::AsDevToolsWindow() {
+ return NULL;
+}
+
+void DevToolsClientHost::NotifyCloseListener() {
+ if (close_listener_) {
+ close_listener_->ClientHostClosing(this);
+ close_listener_ = NULL;
+ }
+}
diff --git a/chrome/browser/debugger/devtools_client_host.h b/chrome/browser/debugger/devtools_client_host.h
index e62237d..952f532 100644
--- a/chrome/browser/debugger/devtools_client_host.h
+++ b/chrome/browser/debugger/devtools_client_host.h
@@ -41,19 +41,14 @@ class DevToolsClientHost {
close_listener_ = listener;
}
- virtual DevToolsWindow* AsDevToolsWindow() { return NULL; }
+ virtual DevToolsWindow* AsDevToolsWindow();
protected:
DevToolsClientHost() : close_listener_(NULL) {}
// Should be called when the devtools client is going to die and this
// DevToolsClientHost should not be used anymore.
- void NotifyCloseListener() {
- if (close_listener_) {
- close_listener_->ClientHostClosing(this);
- close_listener_ = NULL;
- }
- }
+ void NotifyCloseListener();
private:
CloseListener* close_listener_;
diff --git a/chrome/browser/debugger/devtools_remote_listen_socket.cc b/chrome/browser/debugger/devtools_remote_listen_socket.cc
index 8ea1821..3ac15ae 100644
--- a/chrome/browser/debugger/devtools_remote_listen_socket.cc
+++ b/chrome/browser/debugger/devtools_remote_listen_socket.cc
@@ -206,6 +206,10 @@ void DevToolsRemoteListenSocket::HandleMessage() {
}
}
+void DevToolsRemoteListenSocket::Listen() {
+ ListenSocket::Listen();
+}
+
void DevToolsRemoteListenSocket::Accept() {
SOCKET conn = ListenSocket::Accept(socket_);
if (conn != INVALID_SOCKET) {
diff --git a/chrome/browser/debugger/devtools_remote_listen_socket.h b/chrome/browser/debugger/devtools_remote_listen_socket.h
index 5497861..28c3f1f 100644
--- a/chrome/browser/debugger/devtools_remote_listen_socket.h
+++ b/chrome/browser/debugger/devtools_remote_listen_socket.h
@@ -26,7 +26,7 @@ class DevToolsRemoteListenSocket : public ListenSocket,
DevToolsRemoteListener* message_listener);
protected:
- virtual void Listen() { ListenSocket::Listen(); }
+ virtual void Listen();
virtual void Accept();
virtual void Close();
virtual void SendInternal(const char* bytes, int len);
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 51aa1e6..bef546d 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -392,6 +392,10 @@ void DevToolsWindow::UpdateTheme() {
ExecuteJavascriptInWebFrame(L"", UTF8ToWide(command));
}
+bool DevToolsWindow::CanReloadContents(TabContents* source) const {
+ return false;
+}
+
bool DevToolsWindow::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
if (docked_) {
diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h
index a9ba40d..71c8871 100644
--- a/chrome/browser/debugger/devtools_window.h
+++ b/chrome/browser/debugger/devtools_window.h
@@ -88,7 +88,7 @@ class DevToolsWindow
virtual void LoadingStateChanged(TabContents* source) {}
virtual void CloseContents(TabContents* source) {}
virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
- virtual bool CanReloadContents(TabContents* source) const { return false; }
+ virtual bool CanReloadContents(TabContents* source) const;
virtual void URLStarredChanged(TabContents* source, bool starred) {}
virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {}
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index a90fcfc..a96beb6 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -107,6 +107,10 @@ void HistoryUIHTMLSource::StartDataRequest(const std::string& path,
SendResponse(request_id, html_bytes);
}
+std::string HistoryUIHTMLSource::GetMimeType(const std::string&) const {
+ return "text/html";
+}
+
////////////////////////////////////////////////////////////////////////////////
//
// HistoryHandler
diff --git a/chrome/browser/dom_ui/history_ui.h b/chrome/browser/dom_ui/history_ui.h
index 8d33afe..f31a9d8 100644
--- a/chrome/browser/dom_ui/history_ui.h
+++ b/chrome/browser/dom_ui/history_ui.h
@@ -26,9 +26,7 @@ class HistoryUIHTMLSource : 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:
~HistoryUIHTMLSource() {}
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index 8d11e9a..404bb2b 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -27,6 +27,10 @@ DownloadShelfContextMenu::DownloadShelfContextMenu(
DownloadShelfContextMenu::~DownloadShelfContextMenu() {
}
+DownloadItem* DownloadShelfContextMenu::download() const {
+ return download_;
+}
+
bool DownloadShelfContextMenu::IsCommandIdChecked(int command_id) const {
switch (command_id) {
case OPEN_WHEN_COMPLETE:
diff --git a/chrome/browser/download/download_shelf.h b/chrome/browser/download/download_shelf.h
index b6ee780..b85123c 100644
--- a/chrome/browser/download/download_shelf.h
+++ b/chrome/browser/download/download_shelf.h
@@ -48,7 +48,7 @@ class DownloadShelfContextMenu : public menus::SimpleMenuModel::Delegate {
public:
virtual ~DownloadShelfContextMenu();
- virtual DownloadItem* download() const { return download_; }
+ virtual DownloadItem* download() const;
enum ContextMenuCommands {
SHOW_IN_FOLDER = 1, // Open a file explorer window with the item selected.
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 2d99c88..cb6bd6b 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -177,6 +177,10 @@ void ExtensionHost::CreateView(Browser* browser) {
#endif
}
+TabContents* ExtensionHost::associated_tab_contents() const {
+ return associated_tab_contents_;
+}
+
RenderProcessHost* ExtensionHost::render_process_host() const {
return render_view_host_->process();
}
@@ -444,6 +448,14 @@ gfx::NativeWindow ExtensionHost::GetMessageBoxRootWindow() {
return NULL;
}
+TabContents* ExtensionHost::AsTabContents() {
+ return NULL;
+}
+
+ExtensionHost* ExtensionHost::AsExtensionHost() {
+ return this;
+}
+
void ExtensionHost::OnMessageBoxClosed(IPC::Message* reply_msg,
bool success,
const std::wstring& prompt) {
@@ -742,6 +754,10 @@ ViewType::Type ExtensionHost::GetRenderViewType() const {
return extension_host_type_;
}
+const GURL& ExtensionHost::GetURL() const {
+ return url_;
+}
+
void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
if (view_.get())
view_->RenderViewCreated();
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index e447376..935b76c 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -83,9 +83,7 @@ class ExtensionHost : public RenderViewHostDelegate,
ViewType::Type extension_host_type() const { return extension_host_type_; }
// ExtensionFunctionDispatcher::Delegate
- virtual TabContents* associated_tab_contents() const {
- return associated_tab_contents_;
- }
+ virtual TabContents* associated_tab_contents() const;
void set_associated_tab_contents(TabContents* associated_tab_contents) {
associated_tab_contents_ = associated_tab_contents;
}
@@ -109,7 +107,7 @@ class ExtensionHost : public RenderViewHostDelegate,
void DisableScrollbarsForSmallWindows(const gfx::Size& size_limit);
// RenderViewHostDelegate::View implementation.
- virtual const GURL& GetURL() const { return url_; }
+ virtual const GURL& GetURL() const;
virtual void RenderViewCreated(RenderViewHost* render_view_host);
virtual ViewType::Type GetRenderViewType() const;
virtual FileSelect* GetFileSelectDelegate();
@@ -192,8 +190,8 @@ class ExtensionHost : 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 this; }
+ virtual TabContents* AsTabContents();
+ virtual ExtensionHost* AsExtensionHost();
protected:
// Internal functions used to support the CreateNewWidget() method. If a
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index e807637..88d97d2 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -597,6 +597,22 @@ ExtensionsService::ExtensionsService(Profile* profile,
0, kOmniboxIconPaddingRight));
}
+const ExtensionList* ExtensionsService::extensions() const {
+ return &extensions_;
+}
+
+const ExtensionList* ExtensionsService::disabled_extensions() const {
+ return &disabled_extensions_;
+}
+
+const PendingExtensionMap& ExtensionsService::pending_extensions() const {
+ return pending_extensions_;
+}
+
+bool ExtensionsService::HasInstalledExtensions() {
+ return !(extensions_.empty() && disabled_extensions_.empty());
+}
+
ExtensionsService::~ExtensionsService() {
DCHECK(!profile_); // Profile should have told us it's going away.
UnloadAllExtensions();
@@ -1356,6 +1372,10 @@ void ExtensionsService::DestroyingProfile() {
toolbar_model_.DestroyingProfile();
}
+ExtensionPrefs* ExtensionsService::extension_prefs() {
+ return extension_prefs_;
+}
+
void ExtensionsService::CheckAdminBlacklist() {
std::vector<std::string> to_be_removed;
// Loop through extensions list, unload installed extensions.
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 1db154f..68f7bce 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -158,15 +158,11 @@ class ExtensionsService
bool autoupdate_enabled);
// Gets the list of currently installed extensions.
- virtual const ExtensionList* extensions() const { return &extensions_; }
- virtual const ExtensionList* disabled_extensions() const {
- return &disabled_extensions_;
- }
+ virtual const ExtensionList* extensions() const;
+ virtual const ExtensionList* disabled_extensions() const;
// Gets the set of pending extensions.
- virtual const PendingExtensionMap& pending_extensions() const {
- return pending_extensions_;
- }
+ virtual const PendingExtensionMap& pending_extensions() const;
// Registers an extension to be loaded as a component extension.
void register_component_extension(const ComponentExtensionInfo& info) {
@@ -174,9 +170,7 @@ class ExtensionsService
}
// Returns true if any extensions are installed.
- virtual bool HasInstalledExtensions() {
- return !(extensions_.empty() && disabled_extensions_.empty());
- }
+ virtual bool HasInstalledExtensions();
const FilePath& install_directory() const { return install_directory_; }
@@ -404,7 +398,7 @@ class ExtensionsService
// it.
void DestroyingProfile();
- virtual ExtensionPrefs* extension_prefs() { return extension_prefs_; }
+ virtual ExtensionPrefs* extension_prefs();
// Whether the extension service is ready.
// TODO(skerner): Get rid of this method. crbug.com/63756
diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
index e0a6e75..4414591 100644
--- a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc
@@ -649,6 +649,20 @@ void BrowserActionsToolbarGtk::AnimationEnded(const Animation* animation) {
UpdateChevronVisibility();
}
+bool BrowserActionsToolbarGtk::IsCommandIdChecked(int command_id) const {
+ return false;
+}
+
+bool BrowserActionsToolbarGtk::IsCommandIdEnabled(int command_id) const {
+ return true;
+}
+
+bool BrowserActionsToolbarGtk::GetAcceleratorForCommandId(
+ int command_id,
+ menus::Accelerator* accelerator) {
+ return false;
+}
+
void BrowserActionsToolbarGtk::ExecuteCommand(int command_id) {
const Extension* extension = model_->GetExtensionByIndex(command_id);
ExtensionAction* browser_action = extension->browser_action();
diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.h b/chrome/browser/gtk/browser_actions_toolbar_gtk.h
index 5d8b1c3..452a642 100644
--- a/chrome/browser/gtk/browser_actions_toolbar_gtk.h
+++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.h
@@ -117,13 +117,11 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer,
// SimpleMenuModel::Delegate implementation.
// In our case, |command_id| is be the index into the model's extension list.
- virtual bool IsCommandIdChecked(int command_id) const { return false; }
- virtual bool IsCommandIdEnabled(int command_id) const { return true; }
+ 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);
// MenuGtk::Delegate implementation.
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index ce10aa0..eef30ad 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -319,6 +319,10 @@ void PluginProcessHost::OnChannelError() {
CancelRequests();
}
+bool PluginProcessHost::CanShutdown() {
+ return sent_requests_.empty();
+}
+
void PluginProcessHost::CancelRequests() {
for (size_t i = 0; i < pending_requests_.size(); ++i)
pending_requests_[i]->OnError();
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index ac5b326..5bbcc45 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -144,7 +144,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
void OnPluginSetCursorVisibility(bool visible);
#endif
- virtual bool CanShutdown() { return sent_requests_.empty(); }
+ virtual bool CanShutdown();
void CancelRequests();
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index e319e36..095fa82 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -931,6 +931,10 @@ void RenderViewHost::Shutdown() {
RenderWidgetHost::Shutdown();
}
+bool RenderViewHost::IsRenderView() const {
+ return true;
+}
+
void RenderViewHost::CreateNewWindow(
int route_id,
WindowContainerType window_container_type,
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index 96a6b15..b5399bf 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -436,7 +436,7 @@ class RenderViewHost : public RenderWidgetHost {
// RenderWidgetHost public overrides.
virtual void Shutdown();
- virtual bool IsRenderView() const { return true; }
+ virtual bool IsRenderView() const;
virtual void OnMessageReceived(const IPC::Message& msg);
virtual void GotFocus();
virtual void LostCapture();
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 342e887..3fa5610 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -118,6 +118,12 @@ gfx::NativeViewId RenderWidgetHost::GetNativeViewId() {
return 0;
}
+bool RenderWidgetHost::PreHandleKeyboardEvent(
+ const NativeWebKeyboardEvent& event,
+ bool* is_keyboard_shortcut) {
+ return false;
+}
+
void RenderWidgetHost::Init() {
DCHECK(process_->HasConnection());
@@ -139,6 +145,10 @@ void RenderWidgetHost::Shutdown() {
Destroy();
}
+bool RenderWidgetHost::IsRenderView() const {
+ return false;
+}
+
void RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) {
bool msg_is_ok = true;
IPC_BEGIN_MESSAGE_MAP_EX(RenderWidgetHost, msg, msg_is_ok)
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index 45b114b..b0192a4 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -177,7 +177,7 @@ class RenderWidgetHost : public IPC::Channel::Listener,
virtual void Shutdown();
// Manual RTTI FTW. We are not hosting a web page.
- virtual bool IsRenderView() const { return false; }
+ virtual bool IsRenderView() const;
// IPC::Channel::Listener
virtual void OnMessageReceived(const IPC::Message& msg);
@@ -428,9 +428,7 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
// |*is_keyboard_shortcut| should be set to true.
virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut) {
- return false;
- }
+ bool* is_keyboard_shortcut);
// Called when a keyboard event was not processed by the renderer. This is
// overridden by RenderView to send upwards to its delegate.
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc
index aae917a..7112433 100644
--- a/chrome/browser/sidebar/sidebar_container.cc
+++ b/chrome/browser/sidebar/sidebar_container.cc
@@ -67,3 +67,8 @@ void SidebarContainer::SetIcon(const SkBitmap& bitmap) {
void SidebarContainer::SetTitle(const string16& title) {
title_ = title;
}
+
+bool SidebarContainer::IsPopup(const TabContents* source) const {
+ return false;
+}
+
diff --git a/chrome/browser/sidebar/sidebar_container.h b/chrome/browser/sidebar/sidebar_container.h
index 0572f43..3f2d19d 100644
--- a/chrome/browser/sidebar/sidebar_container.h
+++ b/chrome/browser/sidebar/sidebar_container.h
@@ -105,7 +105,7 @@ class SidebarContainer
virtual void LoadingStateChanged(TabContents* source) {}
virtual void CloseContents(TabContents* source) {}
virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
- virtual bool IsPopup(const TabContents* source) const { return false; }
+ virtual bool IsPopup(const TabContents* source) const;
virtual void URLStarredChanged(TabContents* source, bool starred) {}
virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {}
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.cc b/chrome/browser/sync/engine/model_changing_syncer_command.cc
index b2131b4..cc2a8eb 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.cc
+++ b/chrome/browser/sync/engine/model_changing_syncer_command.cc
@@ -29,4 +29,9 @@ void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) {
}
}
+bool ModelChangingSyncerCommand::ModelNeutralExecuteImpl(
+ sessions::SyncSession* session) {
+ return true;
+}
+
} // namespace browser_sync
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.h b/chrome/browser/sync/engine/model_changing_syncer_command.h
index ae59272..f6d6a43 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.h
+++ b/chrome/browser/sync/engine/model_changing_syncer_command.h
@@ -42,9 +42,7 @@ class ModelChangingSyncerCommand : public SyncerCommand {
// *without* a ModelSafeGroup restriction in place on the SyncSession.
// Returns true on success, false on failure.
// TODO(tim): Remove this (bug 36594).
- virtual bool ModelNeutralExecuteImpl(sessions::SyncSession* session) {
- return true;
- }
+ virtual bool ModelNeutralExecuteImpl(sessions::SyncSession* session);
// Abstract method to be implemented by subclasses to handle logic that
// operates on the model. This is invoked with a SyncSession ModelSafeGroup
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.cc b/chrome/browser/sync/engine/net/server_connection_manager.cc
index 41e79f4..20776fe 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.cc
+++ b/chrome/browser/sync/engine/net/server_connection_manager.cc
@@ -329,6 +329,10 @@ std::string ServerConnectionManager::GetServerHost() const {
return gurl.host();
}
+ServerConnectionManager::Post* ServerConnectionManager::MakePost() {
+ return NULL; // For testing.
+}
+
bool FillMessageWithShareDetails(sync_pb::ClientToServerMessage* csm,
syncable::DirectoryManager* manager,
const std::string& share) {
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.h b/chrome/browser/sync/engine/net/server_connection_manager.h
index 0363993..6380151 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.h
+++ b/chrome/browser/sync/engine/net/server_connection_manager.h
@@ -275,9 +275,7 @@ class ServerConnectionManager {
// Factory method to create a Post object we can use for communication with
// the server.
- virtual Post* MakePost() {
- return NULL; // For testing.
- };
+ virtual Post* MakePost();
void set_client_id(const std::string& client_id) {
DCHECK(client_id_.empty());
diff --git a/chrome/browser/sync/engine/syncer_thread.cc b/chrome/browser/sync/engine/syncer_thread.cc
index 12b3435..501577dd 100644
--- a/chrome/browser/sync/engine/syncer_thread.cc
+++ b/chrome/browser/sync/engine/syncer_thread.cc
@@ -364,6 +364,22 @@ void SyncerThread::ThreadMainLoop() {
#endif
}
+void SyncerThread::SetConnected(bool connected) {
+ DCHECK(!thread_.IsRunning());
+ vault_.connected_ = connected;
+}
+
+void SyncerThread::SetSyncerPollingInterval(base::TimeDelta interval) {
+ // TODO(timsteele): Use TimeDelta internally.
+ syncer_polling_interval_ = static_cast<int>(interval.InSeconds());
+}
+
+void SyncerThread::SetSyncerShortPollInterval(base::TimeDelta interval) {
+ // TODO(timsteele): Use TimeDelta internally.
+ syncer_short_poll_interval_seconds_ =
+ static_cast<int>(interval.InSeconds());
+}
+
void SyncerThread::WaitUntilConnectedOrQuit() {
VLOG(1) << "Syncer thread waiting for connection.";
Notify(SyncEngineEvent::SYNCER_THREAD_WAITING_FOR_CONNECTION);
@@ -428,6 +444,10 @@ void SyncerThread::ExitPausedState() {
Notify(SyncEngineEvent::SYNCER_THREAD_RESUMED);
}
+void SyncerThread::DisableIdleDetection() {
+ disable_idle_detection_ = true;
+}
+
// We check how long the user's been idle and sync less often if the machine is
// not in use. The aim is to reduce server load.
SyncerThread::WaitInterval SyncerThread::CalculatePollingWaitTime(
diff --git a/chrome/browser/sync/engine/syncer_thread.h b/chrome/browser/sync/engine/syncer_thread.h
index b079c55..6681225 100644
--- a/chrome/browser/sync/engine/syncer_thread.h
+++ b/chrome/browser/sync/engine/syncer_thread.h
@@ -151,20 +151,10 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
virtual void ThreadMain();
void ThreadMainLoop();
- virtual void SetConnected(bool connected) {
- DCHECK(!thread_.IsRunning());
- vault_.connected_ = connected;
- }
-
- virtual void SetSyncerPollingInterval(base::TimeDelta interval) {
- // TODO(timsteele): Use TimeDelta internally.
- syncer_polling_interval_ = static_cast<int>(interval.InSeconds());
- }
- virtual void SetSyncerShortPollInterval(base::TimeDelta interval) {
- // TODO(timsteele): Use TimeDelta internally.
- syncer_short_poll_interval_seconds_ =
- static_cast<int>(interval.InSeconds());
- }
+ virtual void SetConnected(bool connected);
+
+ virtual void SetSyncerPollingInterval(base::TimeDelta interval);
+ virtual void SetSyncerShortPollInterval(base::TimeDelta interval);
// Needed to emulate the behavior of pthread_create, which synchronously
// started the thread and set the value of thread_running_ to true.
@@ -305,7 +295,7 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
void ExitPausedState();
// For unit tests only.
- virtual void DisableIdleDetection() { disable_idle_detection_ = true; }
+ virtual void DisableIdleDetection();
// This sets all conditions for syncer thread termination but does not
// actually join threads. It is expected that Stop will be called at some
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 1efe37a..5ec89be 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -108,6 +108,12 @@ int64 SessionModelAssociator::GetSyncIdFromChromeId(const std::string& id) {
return node.GetId();
}
+bool SessionModelAssociator::InitSyncNodeFromChromeId(
+ const std::string& id,
+ sync_api::BaseNode* sync_node) {
+ return false;
+}
+
bool SessionModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
DCHECK(CalledOnValidThread());
CHECK(has_nodes);
diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h
index b10d290..502af18 100644
--- a/chrome/browser/sync/glue/session_model_associator.h
+++ b/chrome/browser/sync/glue/session_model_associator.h
@@ -52,10 +52,8 @@ class SessionModelAssociator : public PerDataTypeAssociatorInterface<
explicit SessionModelAssociator(ProfileSyncService* sync_service);
virtual ~SessionModelAssociator();
-
// AssociatorInterface and PerDataTypeAssociator Interface implementation.
virtual void AbortAssociation() {
- return;
// No implementation needed, this associator runs on the main
// thread.
}
@@ -100,9 +98,7 @@ class SessionModelAssociator : public PerDataTypeAssociatorInterface<
// Returns false if no sync node was found for the given chrome node id or
// if the initialization of sync node fails.
virtual bool InitSyncNodeFromChromeId(const std::string& id,
- sync_api::BaseNode* sync_node) {
- return false;
- }
+ sync_api::BaseNode* sync_node);
// The has_nodes out parameter is set to true if the sync model has
// nodes other than the permanent tagged nodes. The method may
diff --git a/chrome/browser/sync/glue/ui_model_worker.cc b/chrome/browser/sync/glue/ui_model_worker.cc
index 86dbf44..24622ae 100644
--- a/chrome/browser/sync/glue/ui_model_worker.cc
+++ b/chrome/browser/sync/glue/ui_model_worker.cc
@@ -89,6 +89,10 @@ void UIModelWorker::Stop() {
state_ = STOPPED;
}
+ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
+ return GROUP_UI;
+}
+
bool UIModelWorker::CurrentThreadIsWorkThread() {
return MessageLoop::current() == ui_loop_;
}
diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h
index 66a2a995..f3a988b 100644
--- a/chrome/browser/sync/glue/ui_model_worker.h
+++ b/chrome/browser/sync/glue/ui_model_worker.h
@@ -67,7 +67,7 @@ class UIModelWorker : public browser_sync::ModelSafeWorker {
// ModelSafeWorker implementation. Called on syncapi SyncerThread.
virtual void DoWorkAndWaitUntilDone(Callback0::Type* work);
- virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_UI; }
+ virtual ModelSafeGroup GetModelSafeGroup();
virtual bool CurrentThreadIsWorkThread();
// Upon receiving this idempotent call, the ModelSafeWorker can
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 272dbe2..fb2473f 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -770,6 +770,10 @@ std::string ProfileSyncService::BuildSyncStatusSummaryText(
}
}
+bool ProfileSyncService::unrecoverable_error_detected() const {
+ return unrecoverable_error_detected_;
+}
+
string16 ProfileSyncService::GetLastSyncedTimeString() const {
if (last_synced_time_.is_null())
return l10n_util::GetStringUTF16(IDS_SYNC_TIME_NEVER);
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index c4d8efd..19583b6 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -233,9 +233,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// TODO(timsteele): What happens if the bookmark model is loaded, a change
// takes place, and the backend isn't initialized yet?
bool sync_initialized() const { return backend_initialized_; }
- virtual bool unrecoverable_error_detected() const {
- return unrecoverable_error_detected_;
- }
+ virtual bool unrecoverable_error_detected() const;
const std::string& unrecoverable_error_message() {
return unrecoverable_error_message_;
}
diff --git a/chrome/browser/tab_closeable_state_watcher.cc b/chrome/browser/tab_closeable_state_watcher.cc
index 198dee5..28c9135 100644
--- a/chrome/browser/tab_closeable_state_watcher.cc
+++ b/chrome/browser/tab_closeable_state_watcher.cc
@@ -27,3 +27,11 @@
watcher = new ::TabCloseableStateWatcher();
return watcher;
}
+
+bool TabCloseableStateWatcher::CanCloseTab(const Browser* browser) const {
+ return true;
+}
+
+bool TabCloseableStateWatcher::CanCloseBrowser(Browser* browser) {
+ return true;
+}
diff --git a/chrome/browser/tab_closeable_state_watcher.h b/chrome/browser/tab_closeable_state_watcher.h
index 8ee81c3..b77a539 100644
--- a/chrome/browser/tab_closeable_state_watcher.h
+++ b/chrome/browser/tab_closeable_state_watcher.h
@@ -32,15 +32,11 @@ class TabCloseableStateWatcher {
// - setting up tab's context menu to determine if "Close tab" should
// should be enabled
// - determining if accelerator keys to close tab should be processed
- virtual bool CanCloseTab(const Browser* browser) const {
- return true;
- }
+ virtual bool CanCloseTab(const Browser* browser) const;
// Called from Browser::IsClosingPermitted which is in turn called from
// Browser::ShouldCloseWindow to check if |browser| can be closed.
- virtual bool CanCloseBrowser(Browser* browser) {
- return true;
- }
+ virtual bool CanCloseBrowser(Browser* browser);
// Called from Browser::CancelWindowClose when closing of window is canceled.
// Watcher is potentially interested in this, especially when the closing of
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index 5067805..96ed7af 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -58,6 +58,18 @@ BackgroundContents::~BackgroundContents() {
render_view_host_->Shutdown(); // deletes render_view_host
}
+BackgroundContents* BackgroundContents::GetAsBackgroundContents() {
+ return this;
+}
+
+RenderViewHostDelegate::View* BackgroundContents::GetViewDelegate() {
+ return this;
+}
+
+const GURL& BackgroundContents::GetURL() const {
+ return url_;
+}
+
ViewType::Type BackgroundContents::GetRenderViewType() const {
return ViewType::BACKGROUND_CONTENTS;
}
diff --git a/chrome/browser/tab_contents/background_contents.h b/chrome/browser/tab_contents/background_contents.h
index 24dadef..3e2f307 100644
--- a/chrome/browser/tab_contents/background_contents.h
+++ b/chrome/browser/tab_contents/background_contents.h
@@ -58,9 +58,9 @@ class BackgroundContents : public RenderViewHostDelegate,
RenderViewHost* render_view_host() { return render_view_host_; }
// RenderViewHostDelegate implementation.
- virtual BackgroundContents* GetAsBackgroundContents() { return this; }
- virtual RenderViewHostDelegate::View* GetViewDelegate() { return this; }
- virtual const GURL& GetURL() const { return url_; }
+ virtual BackgroundContents* GetAsBackgroundContents();
+ virtual RenderViewHostDelegate::View* GetViewDelegate();
+ virtual const GURL& GetURL() const;
virtual ViewType::Type GetRenderViewType() const;
virtual int GetBrowserWindowID() const;
virtual void DidNavigate(RenderViewHost* render_view_host,
diff --git a/chrome/browser/tab_contents/infobar_delegate.cc b/chrome/browser/tab_contents/infobar_delegate.cc
index aae8553..671d17b 100644
--- a/chrome/browser/tab_contents/infobar_delegate.cc
+++ b/chrome/browser/tab_contents/infobar_delegate.cc
@@ -14,6 +14,10 @@
// InfoBarDelegate: ------------------------------------------------------------
+bool InfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
+ return false;
+}
+
bool InfoBarDelegate::ShouldExpire(
const NavigationController::LoadCommittedDetails& details) const {
bool is_reload =
@@ -22,6 +26,44 @@ bool InfoBarDelegate::ShouldExpire(
return is_reload || (contents_unique_id_ != details.entry->unique_id());
}
+SkBitmap* InfoBarDelegate::GetIcon() const {
+ return NULL;
+}
+
+AlertInfoBarDelegate* InfoBarDelegate::AsAlertInfoBarDelegate() {
+ return NULL;
+}
+
+LinkInfoBarDelegate* InfoBarDelegate::AsLinkInfoBarDelegate() {
+ return NULL;
+}
+
+ConfirmInfoBarDelegate* InfoBarDelegate::AsConfirmInfoBarDelegate() {
+ return NULL;
+}
+
+ThemeInstalledInfoBarDelegate*
+InfoBarDelegate::AsThemePreviewInfobarDelegate() {
+ return NULL;
+}
+
+TranslateInfoBarDelegate* InfoBarDelegate::AsTranslateInfoBarDelegate() {
+ return NULL;
+}
+
+ExtensionInfoBarDelegate* InfoBarDelegate::AsExtensionInfoBarDelegate() {
+ return NULL;
+}
+
+CrashedExtensionInfoBarDelegate*
+InfoBarDelegate::AsCrashedExtensionInfoBarDelegate() {
+ return NULL;
+}
+
+InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() {
+ return WARNING_TYPE;
+}
+
InfoBarDelegate::InfoBarDelegate(TabContents* contents)
: contents_unique_id_(0) {
if (contents)
@@ -35,6 +77,10 @@ void InfoBarDelegate::StoreActiveEntryUniqueID(TabContents* contents) {
// AlertInfoBarDelegate: -------------------------------------------------------
+SkBitmap* AlertInfoBarDelegate::GetIcon() const {
+ return NULL;
+}
+
bool AlertInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
AlertInfoBarDelegate* alert_delegate = delegate->AsAlertInfoBarDelegate();
if (!alert_delegate)
@@ -43,18 +89,44 @@ bool AlertInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
return alert_delegate->GetMessageText() == GetMessageText();
}
+AlertInfoBarDelegate* AlertInfoBarDelegate::AsAlertInfoBarDelegate() {
+ return this;
+}
+
AlertInfoBarDelegate::AlertInfoBarDelegate(TabContents* contents)
: InfoBarDelegate(contents) {
}
// LinkInfoBarDelegate: --------------------------------------------------------
+string16 LinkInfoBarDelegate::GetMessageTextWithOffset(
+ size_t* link_offset) const {
+ *link_offset = string16::npos;
+ return string16();
+}
+
+SkBitmap* LinkInfoBarDelegate::GetIcon() const {
+ return NULL;
+}
+
+bool LinkInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
+ return true;
+}
+
+LinkInfoBarDelegate* LinkInfoBarDelegate::AsLinkInfoBarDelegate() {
+ return this;
+}
+
LinkInfoBarDelegate::LinkInfoBarDelegate(TabContents* contents)
: InfoBarDelegate(contents) {
}
// ConfirmInfoBarDelegate: -----------------------------------------------------
+int ConfirmInfoBarDelegate::GetButtons() const {
+ return BUTTON_NONE;
+}
+
string16 ConfirmInfoBarDelegate::GetButtonLabel(
InfoBarButton button) const {
if (button == BUTTON_OK)
@@ -65,6 +137,30 @@ string16 ConfirmInfoBarDelegate::GetButtonLabel(
return string16();
}
+bool ConfirmInfoBarDelegate::NeedElevation(InfoBarButton button) const {
+ return false;
+}
+
+bool ConfirmInfoBarDelegate::Accept() {
+ return true;
+}
+
+bool ConfirmInfoBarDelegate::Cancel() {
+ return true;
+}
+
+string16 ConfirmInfoBarDelegate::GetLinkText() {
+ return string16();
+}
+
+bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
+ return true;
+}
+
+ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
+ return this;
+}
+
ConfirmInfoBarDelegate::ConfirmInfoBarDelegate(TabContents* contents)
: AlertInfoBarDelegate(contents) {
}
diff --git a/chrome/browser/tab_contents/infobar_delegate.h b/chrome/browser/tab_contents/infobar_delegate.h
index 4da3510..af9b9c9 100644
--- a/chrome/browser/tab_contents/infobar_delegate.h
+++ b/chrome/browser/tab_contents/infobar_delegate.h
@@ -58,9 +58,7 @@ class InfoBarDelegate {
// because a matching one already exists. If this function returns true, the
// TabContents will not add the new delegate because it considers one to
// already be present.
- virtual bool EqualsDelegate(InfoBarDelegate* delegate) const {
- return false;
- }
+ virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
// Returns true if the InfoBar should be closed automatically after the page
// is navigated. The default behavior is to return true if the page is
@@ -81,52 +79,36 @@ class InfoBarDelegate {
// Return the icon to be shown for this InfoBar. If the returned bitmap is
// NULL, no icon is shown.
- virtual SkBitmap* GetIcon() const { return NULL; }
+ virtual SkBitmap* GetIcon() const;
// Returns a pointer to the AlertInfoBarDelegate interface, if implemented.
- virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate() {
- return NULL;
- }
+ virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate();
// Returns a pointer to the LinkInfoBarDelegate interface, if implemented.
- virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() {
- return NULL;
- }
+ virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate();
// Returns a pointer to the ConfirmInfoBarDelegate interface, if implemented.
- virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate() {
- return NULL;
- }
+ virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate();
// Returns a pointer to the ThemeInstalledInfoBarDelegate interface, if
// implemented.
- virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate() {
- return NULL;
- }
+ virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate();
// Returns a pointer to the TranslateInfoBarDelegate interface, if
// implemented.
- virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() {
- return NULL;
- }
+ virtual TranslateInfoBarDelegate* AsTranslateInfoBarDelegate();
// Returns a pointer to the ExtensionInfoBarDelegate interface, if
// implemented.
- virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() {
- return NULL;
- }
+ virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate();
// Returns a pointer to the CrashedExtensionInfoBarDelegate interface, if
// implemented.
- virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate() {
- return NULL;
- }
+ virtual CrashedExtensionInfoBarDelegate* AsCrashedExtensionInfoBarDelegate();
// Returns the type of the infobar. The type determines the appearance (such
// as background color) of the infobar.
- virtual Type GetInfoBarType() {
- return WARNING_TYPE;
- }
+ virtual Type GetInfoBarType();
protected:
// Provided to subclasses as a convenience to initialize the state of this
@@ -157,12 +139,12 @@ class AlertInfoBarDelegate : public InfoBarDelegate {
virtual string16 GetMessageText() const = 0;
// Overridden from InfoBarDelegate.
- virtual SkBitmap* GetIcon() const { return NULL; }
+ virtual SkBitmap* GetIcon() const;
// Overridden from InfoBarDelegate:
virtual bool EqualsDelegate(InfoBarDelegate* delegate) const;
virtual InfoBar* CreateInfoBar();
- virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate() { return this; }
+ virtual AlertInfoBarDelegate* AsAlertInfoBarDelegate();
protected:
explicit AlertInfoBarDelegate(TabContents* contents);
@@ -178,31 +160,24 @@ class LinkInfoBarDelegate : public InfoBarDelegate {
// is the position where the link should be inserted. If |link_offset| is set
// to string16::npos (it is by default), the link is right aligned within
// the InfoBar rather than being embedded in the message text.
- virtual string16 GetMessageTextWithOffset(size_t* link_offset) const {
- *link_offset = string16::npos;
- return string16();
- }
+ virtual string16 GetMessageTextWithOffset(size_t* link_offset) const;
// Returns the text of the link to be displayed.
virtual string16 GetLinkText() const = 0;
// Overridden from InfoBarDelegate.
- virtual SkBitmap* GetIcon() const { return NULL; }
+ virtual SkBitmap* GetIcon() const;
// Called when the Link is clicked. The |disposition| specifies how the
// resulting document should be loaded (based on the event flags present when
// the link was clicked). This function returns true if the InfoBar should be
// closed now or false if it should remain until the user explicitly closes
// it.
- virtual bool LinkClicked(WindowOpenDisposition disposition) {
- return true;
- }
+ virtual bool LinkClicked(WindowOpenDisposition disposition);
// Overridden from InfoBarDelegate:
virtual InfoBar* CreateInfoBar();
- virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate() {
- return this;
- }
+ virtual LinkInfoBarDelegate* AsLinkInfoBarDelegate();
protected:
explicit LinkInfoBarDelegate(TabContents* contents);
@@ -223,30 +198,26 @@ class ConfirmInfoBarDelegate : public AlertInfoBarDelegate {
};
// Return the buttons to be shown for this InfoBar.
- virtual int GetButtons() const {
- return BUTTON_NONE;
- }
+ virtual int GetButtons() const;
// Return the label for the specified button. The default implementation
// returns "OK" for the OK button and "Cancel" for the Cancel button.
virtual string16 GetButtonLabel(InfoBarButton button) const;
// Return whether or not the specified button needs elevation.
- virtual bool NeedElevation(InfoBarButton button) const { return false; }
+ virtual bool NeedElevation(InfoBarButton button) const;
// Called when the OK button is pressed. If the function returns true, the
// InfoBarDelegate should be removed from the associated TabContents.
- virtual bool Accept() { return true; }
+ virtual bool Accept();
// Called when the Cancel button is pressed. If the function returns true,
// the InfoBarDelegate should be removed from the associated TabContents.
- virtual bool Cancel() { return true; }
+ virtual bool Cancel();
// Returns the text of the link to be displayed, if any. Otherwise returns
// and empty string.
- virtual string16 GetLinkText() {
- return string16();
- }
+ virtual string16 GetLinkText();
// Called when the Link is clicked. The |disposition| specifies how the
// resulting document should be loaded (based on the event flags present when
@@ -254,15 +225,11 @@ class ConfirmInfoBarDelegate : public AlertInfoBarDelegate {
// closed now or false if it should remain until the user explicitly closes
// it.
// Will only be called if GetLinkText() returns non-empty string.
- virtual bool LinkClicked(WindowOpenDisposition disposition) {
- return true;
- }
+ virtual bool LinkClicked(WindowOpenDisposition disposition);
// Overridden from InfoBarDelegate:
virtual InfoBar* CreateInfoBar();
- virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate() {
- return this;
- }
+ virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate();
protected:
explicit ConfirmInfoBarDelegate(TabContents* contents);
diff --git a/chrome/browser/themes/browser_theme_provider.cc b/chrome/browser/themes/browser_theme_provider.cc
index 3b33f04..36763bb 100644
--- a/chrome/browser/themes/browser_theme_provider.cc
+++ b/chrome/browser/themes/browser_theme_provider.cc
@@ -326,6 +326,10 @@ void BrowserThemeProvider::UseDefaultTheme() {
UserMetrics::RecordAction(UserMetricsAction("Themes_Reset"), profile_);
}
+void BrowserThemeProvider::SetNativeTheme() {
+ UseDefaultTheme();
+}
+
bool BrowserThemeProvider::UsingDefaultTheme() {
return GetThemeID() == BrowserThemeProvider::kDefaultThemeID;
}
diff --git a/chrome/browser/themes/browser_theme_provider.h b/chrome/browser/themes/browser_theme_provider.h
index 2322b8b..cddd153 100644
--- a/chrome/browser/themes/browser_theme_provider.h
+++ b/chrome/browser/themes/browser_theme_provider.h
@@ -159,7 +159,7 @@ class BrowserThemeProvider : public NonThreadSafe,
// Set the current theme to the native theme. On some platforms, the native
// theme is the default theme.
- virtual void SetNativeTheme() { UseDefaultTheme(); }
+ virtual void SetNativeTheme();
// Whether we're using the chrome default theme. Virtual so linux can check
// if we're using the GTK theme.
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
index 746140c..40e9189 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
@@ -38,6 +38,10 @@ void AppModalDialog::CreateAndShowDialog() {
native_dialog_->ShowAppModalDialog();
}
+bool AppModalDialog::IsValid() {
+ return !skip_this_dialog_;
+}
+
void AppModalDialog::ActivateModalDialog() {
DCHECK(native_dialog_);
native_dialog_->ActivateAppModalDialog();
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h
index eb64790..ddc1808 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h
@@ -56,7 +56,7 @@ class AppModalDialog {
// added to the AppModalDialogQueue. When the current modal dialog finishes
// and it's time to show the next dialog in the queue IsValid is invoked.
// If IsValid returns false the dialog is deleted and not shown.
- virtual bool IsValid() { return !skip_this_dialog_; }
+ virtual bool IsValid();
protected:
// Overridden by subclasses to create the feature-specific native dialog box.
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index 22495f8..1756d3e 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -165,6 +165,16 @@ void UtilityProcessHost::OnProcessCrashed() {
NewRunnableMethod(client_.get(), &Client::OnProcessCrashed));
}
+bool UtilityProcessHost::CanShutdown() {
+ return true;
+}
+
+URLRequestContext* UtilityProcessHost::GetRequestContext(
+ uint32 request_id,
+ const ViewHostMsg_Resource_Request& request_data) {
+ return NULL;
+}
+
void UtilityProcessHost::Client::OnMessageReceived(
const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(UtilityProcessHost, message)
diff --git a/chrome/browser/utility_process_host.h b/chrome/browser/utility_process_host.h
index 555ef44..559f39e 100644
--- a/chrome/browser/utility_process_host.h
+++ b/chrome/browser/utility_process_host.h
@@ -154,12 +154,10 @@ class UtilityProcessHost : public BrowserChildProcessHost {
// BrowserChildProcessHost:
virtual void OnProcessCrashed();
- virtual bool CanShutdown() { return true; }
+ virtual bool CanShutdown();
virtual URLRequestContext* GetRequestContext(
uint32 request_id,
- const ViewHostMsg_Resource_Request& request_data) {
- return NULL;
- }
+ const ViewHostMsg_Resource_Request& request_data);
// A pointer to our client interface, who will be informed of progress.
scoped_refptr<Client> client_;
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 177b175..cf73ef0 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -549,6 +549,7 @@
'browser/debugger/debugger_remote_service.h',
'browser/debugger/debugger_wrapper.cc',
'browser/debugger/debugger_wrapper.h',
+ 'browser/debugger/devtools_client_host.cc',
'browser/debugger/devtools_client_host.h',
'browser/debugger/devtools_http_protocol_handler.cc',
'browser/debugger/devtools_http_protocol_handler.h',
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 49c8f78..abdcdcb 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -192,6 +192,7 @@
'browser/autofill/credit_card.h',
'browser/autofill/fax_field.cc',
'browser/autofill/fax_field.h',
+ 'browser/autofill/fax_number.cc',
'browser/autofill/fax_number.h',
'browser/autofill/field_types.h',
'browser/autofill/form_field.cc',
@@ -200,6 +201,7 @@
'browser/autofill/form_group.h',
'browser/autofill/form_structure.cc',
'browser/autofill/form_structure.h',
+ 'browser/autofill/home_address.cc',
'browser/autofill/home_address.h',
'browser/autofill/home_phone_number.h',
'browser/autofill/name_field.cc',
@@ -276,6 +278,8 @@
'browser/background_page_tracker.h',
'browser/blocked_content_container.cc',
'browser/blocked_content_container.h',
+ 'browser/bookmarks/base_bookmark_model_observer.cc',
+ 'browser/bookmarks/base_bookmark_model_observer.h',
'browser/bookmarks/bookmark_codec.cc',
'browser/bookmarks/bookmark_codec.h',
'browser/bookmarks/bookmark_context_menu_controller.cc',
diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc
index bbf33d7..f5ff7282 100644
--- a/chrome/common/json_pref_store.cc
+++ b/chrome/common/json_pref_store.cc
@@ -69,6 +69,10 @@ void JsonPrefStore::RemoveValue(const std::string& key) {
}
}
+bool JsonPrefStore::ReadOnly() const {
+ return read_only_;
+}
+
PersistentPrefStore::PrefReadError JsonPrefStore::ReadPrefs() {
if (path_.empty()) {
read_only_ = true;
diff --git a/chrome/common/json_pref_store.h b/chrome/common/json_pref_store.h
index a97985d..84a73c9 100644
--- a/chrome/common/json_pref_store.h
+++ b/chrome/common/json_pref_store.h
@@ -42,7 +42,7 @@ class JsonPrefStore : public PersistentPrefStore,
virtual void SetValue(const std::string& key, Value* value);
virtual void SetValueSilently(const std::string& key, Value* value);
virtual void RemoveValue(const std::string& key);
- virtual bool ReadOnly() const { return read_only_; }
+ virtual bool ReadOnly() const;
virtual PrefReadError ReadPrefs();
virtual bool WritePrefs();
virtual void ScheduleWritePrefs();
diff --git a/chrome/common/metrics_helpers.cc b/chrome/common/metrics_helpers.cc
index 7296ce1..c452937 100644
--- a/chrome/common/metrics_helpers.cc
+++ b/chrome/common/metrics_helpers.cc
@@ -377,6 +377,10 @@ int64 MetricsLogBase::GetBuildTime() {
return integral_build_time;
}
+MetricsLog* MetricsLogBase::AsMetricsLog() {
+ return NULL;
+}
+
// TODO(JAR): A The following should really be part of the histogram class.
// Internal state is being needlessly exposed, and it would be hard to reuse
// this code. If we moved this into the Histogram class, then we could use
diff --git a/chrome/common/metrics_helpers.h b/chrome/common/metrics_helpers.h
index bd18b88..3de3fbd 100644
--- a/chrome/common/metrics_helpers.h
+++ b/chrome/common/metrics_helpers.h
@@ -99,9 +99,7 @@ class MetricsLogBase {
version_extension_ = extension;
}
- virtual MetricsLog* AsMetricsLog() {
- return NULL;
- }
+ virtual MetricsLog* AsMetricsLog();
protected:
class XmlWrapper;
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index 6b2bdbbb..9ec9dc5 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -102,6 +102,10 @@ FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() {
return GetChildPath(true);
}
+bool ServiceUtilityProcessHost::CanShutdown() {
+ return true;
+}
+
void ServiceUtilityProcessHost::OnChildDied() {
if (waiting_for_reply_) {
// If we are yet to receive a reply then notify the client that the
diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h
index fa1331d..7e066a1 100644
--- a/chrome/service/service_utility_process_host.h
+++ b/chrome/service/service_utility_process_host.h
@@ -99,7 +99,7 @@ class ServiceUtilityProcessHost : public ServiceChildProcessHost {
virtual FilePath GetUtilityProcessCmd();
// Overriden from ChildProcessHost.
- virtual bool CanShutdown() { return true; }
+ virtual bool CanShutdown();
virtual void OnChildDied();
private:
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 73cc483..315731b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -382,6 +382,11 @@ bool ContextCreationAttribParser::Parse(const std::vector<int32>& attribs) {
// } // anonymous namespace.
+bool GLES2Decoder::GetServiceTextureId(uint32 client_texture_id,
+ uint32* service_texture_id) {
+ return false;
+}
+
GLES2Decoder::GLES2Decoder()
: debug_(false) {
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index eddd7fe..195adb1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -99,9 +99,7 @@ class GLES2Decoder : public CommonDecoder {
// Get the service texture ID corresponding to a client texture ID.
// If no such record is found then return false.
virtual bool GetServiceTextureId(uint32 client_texture_id,
- uint32* service_texture_id) {
- return false;
- }
+ uint32* service_texture_id);
protected:
GLES2Decoder();
diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc
index eb5b265..43b29ef 100644
--- a/gpu/command_buffer/service/shader_translator.cc
+++ b/gpu/command_buffer/service/shader_translator.cc
@@ -136,6 +136,24 @@ bool ShaderTranslator::Translate(const char* shader) {
return success;
}
+const char* ShaderTranslator::translated_shader() const {
+ return translated_shader_.get();
+}
+
+const char* ShaderTranslator::info_log() const {
+ return info_log_.get();
+}
+
+const ShaderTranslatorInterface::VariableMap&
+ShaderTranslator::attrib_map() const {
+ return attrib_map_;
+}
+
+const ShaderTranslatorInterface::VariableMap&
+ShaderTranslator::uniform_map() const {
+ return uniform_map_;
+}
+
void ShaderTranslator::ClearResults() {
translated_shader_.reset();
info_log_.reset();
diff --git a/gpu/command_buffer/service/shader_translator.h b/gpu/command_buffer/service/shader_translator.h
index 084d1b8..9e834ea 100644
--- a/gpu/command_buffer/service/shader_translator.h
+++ b/gpu/command_buffer/service/shader_translator.h
@@ -75,13 +75,12 @@ class ShaderTranslator : public ShaderTranslatorInterface {
virtual bool Translate(const char* shader);
// Overridden from ShaderTranslatorInterface.
- virtual const char* translated_shader() const {
- return translated_shader_.get(); }
- virtual const char* info_log() const { return info_log_.get(); }
+ virtual const char* translated_shader() const;
+ virtual const char* info_log() const;
// Overridden from ShaderTranslatorInterface.
- virtual const VariableMap& attrib_map() const { return attrib_map_; }
- virtual const VariableMap& uniform_map() const { return uniform_map_; }
+ virtual const VariableMap& attrib_map() const;
+ virtual const VariableMap& uniform_map() const;
private:
void ClearResults();
diff --git a/media/filters/video_renderer_base.cc b/media/filters/video_renderer_base.cc
index b399f58..7c964a6 100644
--- a/media/filters/video_renderer_base.cc
+++ b/media/filters/video_renderer_base.cc
@@ -430,6 +430,10 @@ void VideoRendererBase::ConsumeVideoFrame(scoped_refptr<VideoFrame> frame) {
}
}
+VideoDecoder* VideoRendererBase::GetDecoder() {
+ return decoder_.get();
+}
+
void VideoRendererBase::ReadInput(scoped_refptr<VideoFrame> frame) {
// We should never return empty frames or EOS frame.
DCHECK(frame.get() && !frame->IsEndOfStream());
diff --git a/media/filters/video_renderer_base.h b/media/filters/video_renderer_base.h
index 4220ce7..10ee2fa 100644
--- a/media/filters/video_renderer_base.h
+++ b/media/filters/video_renderer_base.h
@@ -94,9 +94,7 @@ class VideoRendererBase : public VideoRenderer,
// class executes on.
virtual void OnFrameAvailable() = 0;
- virtual VideoDecoder* GetDecoder() {
- return decoder_.get();
- }
+ virtual VideoDecoder* GetDecoder();
int width() { return width_; }
int height() { return height_; }
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index e9e137f..b53ec6d 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -1132,6 +1132,10 @@ void HostResolverImpl::ProbeIPv6Support() {
OnIPAddressChanged(); // Give initial setup call.
}
+HostResolverImpl* HostResolverImpl::GetAsHostResolverImpl() {
+ return this;
+}
+
void HostResolverImpl::Shutdown() {
DCHECK(CalledOnValidThread());
diff --git a/net/base/host_resolver_impl.h b/net/base/host_resolver_impl.h
index 46ce31d..68c8c0b 100644
--- a/net/base/host_resolver_impl.h
+++ b/net/base/host_resolver_impl.h
@@ -105,7 +105,7 @@ class HostResolverImpl : public HostResolver,
// address family to IPv4 iff IPv6 is not supported.
void ProbeIPv6Support();
- virtual HostResolverImpl* GetAsHostResolverImpl() { return this; }
+ virtual HostResolverImpl* GetAsHostResolverImpl();
// TODO(eroman): hack for http://crbug.com/15513
virtual void Shutdown();
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc
index c324709a..e97d06e 100644
--- a/net/http/http_auth_controller.cc
+++ b/net/http/http_auth_controller.cc
@@ -393,6 +393,14 @@ void HttpAuthController::ResetAuth(const string16& username,
}
}
+bool HttpAuthController::HaveAuthHandler() const {
+ return handler_.get() != NULL;
+}
+
+bool HttpAuthController::HaveAuth() const {
+ return handler_.get() && !identity_.invalid;
+}
+
void HttpAuthController::InvalidateCurrentHandler() {
DCHECK(CalledOnValidThread());
diff --git a/net/http/http_auth_controller.h b/net/http/http_auth_controller.h
index bcda707..1d0a5cd 100644
--- a/net/http/http_auth_controller.h
+++ b/net/http/http_auth_controller.h
@@ -63,13 +63,9 @@ class HttpAuthController : public base::RefCounted<HttpAuthController>,
virtual void ResetAuth(const string16& username,
const string16& password);
- virtual bool HaveAuthHandler() const {
- return handler_.get() != NULL;
- }
+ virtual bool HaveAuthHandler() const;
- virtual bool HaveAuth() const {
- return handler_.get() && !identity_.invalid;
- }
+ virtual bool HaveAuth() const;
virtual scoped_refptr<AuthChallengeInfo> auth_info();
diff --git a/net/http/http_proxy_client_socket.cc b/net/http/http_proxy_client_socket.cc
index 1e6b713..c2c2899 100644
--- a/net/http/http_proxy_client_socket.cc
+++ b/net/http/http_proxy_client_socket.cc
@@ -162,6 +162,10 @@ bool HttpProxyClientSocket::IsConnectedAndIdle() const {
transport_->socket()->IsConnectedAndIdle();
}
+const BoundNetLog& HttpProxyClientSocket::NetLog() const {
+ return net_log_;
+}
+
void HttpProxyClientSocket::SetSubresourceSpeculation() {
if (transport_.get() && transport_->socket()) {
transport_->socket()->SetSubresourceSpeculation();
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index e11e731..8e345b9 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -74,7 +74,7 @@ class HttpProxyClientSocket : 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/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index d0c177d..13fa0a1 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -422,6 +422,10 @@ void HttpProxyClientSocketPool::CloseIdleSockets() {
base_.CloseIdleSockets();
}
+int HttpProxyClientSocketPool::IdleSocketCount() const {
+ return base_.idle_socket_count();
+}
+
int HttpProxyClientSocketPool::IdleSocketCountInGroup(
const std::string& group_name) const {
return base_.IdleSocketCountInGroup(group_name);
@@ -454,4 +458,12 @@ DictionaryValue* HttpProxyClientSocketPool::GetInfoAsValue(
return dict;
}
+base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const {
+ return base_.ConnectionTimeout();
+}
+
+ClientSocketPoolHistograms* HttpProxyClientSocketPool::histograms() const {
+ return base_.histograms();
+}
+
} // namespace net
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index 24dbeaa..fb3967d 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -204,9 +204,7 @@ class HttpProxyClientSocketPool : public ClientSocketPool {
virtual void CloseIdleSockets();
- virtual int IdleSocketCount() const {
- return base_.idle_socket_count();
- }
+ virtual int IdleSocketCount() const;
virtual int IdleSocketCountInGroup(const std::string& group_name) const;
@@ -217,13 +215,9 @@ class HttpProxyClientSocketPool : public ClientSocketPool {
const std::string& type,
bool include_nested_pools) const;
- virtual base::TimeDelta ConnectionTimeout() const {
- return base_.ConnectionTimeout();
- }
+ virtual base::TimeDelta ConnectionTimeout() const;
- virtual ClientSocketPoolHistograms* histograms() const {
- return base_.histograms();
- };
+ virtual ClientSocketPoolHistograms* histograms() const;
private:
typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase;
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 5b21005..7124efa 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -479,6 +479,10 @@ void SSLClientSocketPool::CloseIdleSockets() {
base_.CloseIdleSockets();
}
+int SSLClientSocketPool::IdleSocketCount() const {
+ return base_.idle_socket_count();
+}
+
int SSLClientSocketPool::IdleSocketCountInGroup(
const std::string& group_name) const {
return base_.IdleSocketCountInGroup(group_name);
@@ -520,4 +524,12 @@ DictionaryValue* SSLClientSocketPool::GetInfoAsValue(
return dict;
}
+base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const {
+ return base_.ConnectionTimeout();
+}
+
+ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const {
+ return base_.histograms();
+}
+
} // namespace net
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index 5eb8594..136516f 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -209,9 +209,7 @@ class SSLClientSocketPool : public ClientSocketPool,
virtual void CloseIdleSockets();
- virtual int IdleSocketCount() const {
- return base_.idle_socket_count();
- }
+ virtual int IdleSocketCount() const;
virtual int IdleSocketCountInGroup(const std::string& group_name) const;
@@ -222,13 +220,9 @@ class SSLClientSocketPool : public ClientSocketPool,
const std::string& type,
bool include_nested_pools) const;
- virtual base::TimeDelta ConnectionTimeout() const {
- return base_.ConnectionTimeout();
- }
+ virtual base::TimeDelta ConnectionTimeout() const;
- virtual ClientSocketPoolHistograms* histograms() const {
- return base_.histograms();
- };
+ virtual ClientSocketPoolHistograms* histograms() const;
private:
// SSLConfigService::Observer methods:
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index bb560b0..6b8190f 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -293,6 +293,10 @@ bool URLRequestHttpJob::GetContentEncodings(
return !encoding_types->empty();
}
+bool URLRequestHttpJob::IsCachedContent() const {
+ return is_cached_content_;
+}
+
bool URLRequestHttpJob::IsSdchResponse() const {
return sdch_dictionary_advertised_;
}
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h
index bf1b37f..78778c5 100644
--- a/net/url_request/url_request_http_job.h
+++ b/net/url_request/url_request_http_job.h
@@ -49,7 +49,7 @@ class URLRequestHttpJob : public URLRequestJob {
virtual int GetResponseCode() const;
virtual bool GetContentEncodings(
std::vector<Filter::FilterType>* encoding_type);
- virtual bool IsCachedContent() const { return is_cached_content_; }
+ virtual bool IsCachedContent() const;
virtual bool IsSdchResponse() const;
virtual bool IsSafeRedirect(const GURL& location);
virtual bool NeedsAuth();
diff --git a/ppapi/proxy/image_data.cc b/ppapi/proxy/image_data.cc
index c01896d..2af7026 100644
--- a/ppapi/proxy/image_data.cc
+++ b/ppapi/proxy/image_data.cc
@@ -26,6 +26,10 @@ ImageData::~ImageData() {
Unmap();
}
+ImageData* ImageData::AsImageData() {
+ return this;
+}
+
void* ImageData::Map() {
#if defined(OS_WIN)
NOTIMPLEMENTED();
diff --git a/ppapi/proxy/image_data.h b/ppapi/proxy/image_data.h
index fb4a839..6e962ab 100644
--- a/ppapi/proxy/image_data.h
+++ b/ppapi/proxy/image_data.h
@@ -19,7 +19,7 @@ class ImageData : public PluginResource {
virtual ~ImageData();
// Resource overrides.
- virtual ImageData* AsImageData() { return this; }
+ virtual ImageData* AsImageData();
void* Map();
void Unmap();
diff --git a/ppapi/proxy/plugin_resource.cc b/ppapi/proxy/plugin_resource.cc
index d535cc7..05803ef 100644
--- a/ppapi/proxy/plugin_resource.cc
+++ b/ppapi/proxy/plugin_resource.cc
@@ -15,9 +15,8 @@ PluginResource::~PluginResource() {
#define DEFINE_TYPE_GETTER(RESOURCE) \
RESOURCE* PluginResource::As##RESOURCE() { return NULL; }
-FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER)
+FOR_ALL_PLUGIN_RESOURCES(DEFINE_TYPE_GETTER)
#undef DEFINE_TYPE_GETTER
-
} // namespace proxy
} // namespace pp
diff --git a/ppapi/proxy/plugin_resource.h b/ppapi/proxy/plugin_resource.h
index 2c195bc..780a2bd 100644
--- a/ppapi/proxy/plugin_resource.h
+++ b/ppapi/proxy/plugin_resource.h
@@ -10,7 +10,7 @@
#include "ppapi/proxy/plugin_resource_tracker.h"
// If you inherit from resource, make sure you add the class name here.
-#define FOR_ALL_RESOURCES(F) \
+#define FOR_ALL_PLUGIN_RESOURCES(F) \
F(Audio) \
F(AudioConfig) \
F(Buffer) \
@@ -27,7 +27,7 @@ namespace proxy {
// Forward declaration of Resource classes.
#define DECLARE_RESOURCE_CLASS(RESOURCE) class RESOURCE;
-FOR_ALL_RESOURCES(DECLARE_RESOURCE_CLASS)
+FOR_ALL_PLUGIN_RESOURCES(DECLARE_RESOURCE_CLASS)
#undef DECLARE_RESOURCE_CLASS
class PluginResource {
@@ -51,7 +51,7 @@ class PluginResource {
// function.
#define DEFINE_TYPE_GETTER(RESOURCE) \
virtual RESOURCE* As##RESOURCE();
- FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER)
+ FOR_ALL_PLUGIN_RESOURCES(DEFINE_TYPE_GETTER)
#undef DEFINE_TYPE_GETTER
DISALLOW_COPY_AND_ASSIGN(PluginResource);
@@ -62,7 +62,7 @@ class PluginResource {
template <> inline Type* PluginResource::Cast<Type>() { \
return As##Type(); \
}
-FOR_ALL_RESOURCES(DEFINE_RESOURCE_CAST)
+FOR_ALL_PLUGIN_RESOURCES(DEFINE_RESOURCE_CAST)
#undef DEFINE_RESOURCE_CAST
} // namespace proxy
diff --git a/remoting/jingle_glue/ssl_socket_adapter.cc b/remoting/jingle_glue/ssl_socket_adapter.cc
index 45accf5..54955ab 100644
--- a/remoting/jingle_glue/ssl_socket_adapter.cc
+++ b/remoting/jingle_glue/ssl_socket_adapter.cc
@@ -234,6 +234,10 @@ int TransportSocket::GetPeerAddress(net::AddressList* address) const {
return net::OK;
}
+const net::BoundNetLog& TransportSocket::NetLog() const {
+ return net_log_;
+}
+
void TransportSocket::SetSubresourceSpeculation() {
NOTREACHED();
}
diff --git a/remoting/jingle_glue/ssl_socket_adapter.h b/remoting/jingle_glue/ssl_socket_adapter.h
index 2843bda..6c80b26 100644
--- a/remoting/jingle_glue/ssl_socket_adapter.h
+++ b/remoting/jingle_glue/ssl_socket_adapter.h
@@ -42,7 +42,7 @@ class TransportSocket : public net::ClientSocket, public sigslot::has_slots<> {
virtual bool IsConnected() const;
virtual bool IsConnectedAndIdle() const;
virtual int GetPeerAddress(net::AddressList* address) const;
- virtual const net::BoundNetLog& NetLog() const { return net_log_; }
+ virtual const net::BoundNetLog& NetLog() const;
virtual void SetSubresourceSpeculation();
virtual void SetOmniboxSpeculation();
virtual bool WasEverUsed() const;
diff --git a/skia/ext/vector_platform_device_linux.cc b/skia/ext/vector_platform_device_linux.cc
index 3d45596..94292cdb 100644
--- a/skia/ext/vector_platform_device_linux.cc
+++ b/skia/ext/vector_platform_device_linux.cc
@@ -122,6 +122,18 @@ VectorPlatformDevice::~VectorPlatformDevice() {
cairo_destroy(context_);
}
+SkDeviceFactory* VectorPlatformDevice::getDeviceFactory() {
+ return SkNEW(VectorPlatformDeviceFactory);
+}
+
+bool VectorPlatformDevice::IsVectorial() {
+ return true;
+}
+
+PlatformDevice::PlatformSurface VectorPlatformDevice::beginPlatformPaint() {
+ return context_;
+}
+
void VectorPlatformDevice::drawBitmap(const SkDraw& draw,
const SkBitmap& bitmap,
const SkMatrix& matrix,
diff --git a/skia/ext/vector_platform_device_linux.h b/skia/ext/vector_platform_device_linux.h
index c6cff16..1cf8a0c 100644
--- a/skia/ext/vector_platform_device_linux.h
+++ b/skia/ext/vector_platform_device_linux.h
@@ -33,12 +33,10 @@ class VectorPlatformDevice : public PlatformDevice {
int width, int height);
virtual ~VectorPlatformDevice();
- virtual SkDeviceFactory* getDeviceFactory() {
- return SkNEW(VectorPlatformDeviceFactory);
- }
+ virtual SkDeviceFactory* getDeviceFactory();
- virtual bool IsVectorial() { return true; }
- virtual PlatformSurface beginPlatformPaint() { return context_; }
+ virtual bool IsVectorial();
+ virtual PlatformSurface beginPlatformPaint();
// We translate following skia APIs into corresponding Cairo APIs.
virtual void drawBitmap(const SkDraw& draw, const SkBitmap& bitmap,
diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc
index 9dc19ea..10245f7 100644
--- a/webkit/appcache/appcache_url_request_job.cc
+++ b/webkit/appcache/appcache_url_request_job.cc
@@ -256,6 +256,10 @@ int AppCacheURLRequestJob::GetResponseCode() const {
return http_info()->headers->response_code();
}
+bool AppCacheURLRequestJob::IsCachedContent() const {
+ return is_delivering_appcache_response();
+}
+
bool AppCacheURLRequestJob::ReadRawData(net::IOBuffer* buf, int buf_size,
int *bytes_read) {
DCHECK(is_delivering_appcache_response());
diff --git a/webkit/appcache/appcache_url_request_job.h b/webkit/appcache/appcache_url_request_job.h
index 2b97291..f66ed54 100644
--- a/webkit/appcache/appcache_url_request_job.h
+++ b/webkit/appcache/appcache_url_request_job.h
@@ -125,9 +125,7 @@ class AppCacheURLRequestJob : public net::URLRequestJob,
// FilterContext methods
virtual bool GetMimeType(std::string* mime_type) const;
virtual int GetResponseCode() const;
- virtual bool IsCachedContent() const {
- return is_delivering_appcache_response();
- }
+ virtual bool IsCachedContent() const;
AppCacheStorage* storage_;
bool has_been_started_;
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc
index 2e91bcc..c5e39b7 100644
--- a/webkit/glue/media/buffered_data_source.cc
+++ b/webkit/glue/media/buffered_data_source.cc
@@ -253,6 +253,26 @@ void BufferedResourceLoader::SetAllowDefer(bool is_allowed) {
DisableDeferIfNeeded();
}
+int64 BufferedResourceLoader::content_length() {
+ return content_length_;
+}
+
+int64 BufferedResourceLoader::instance_size() {
+ return instance_size_;
+}
+
+bool BufferedResourceLoader::partial_response() {
+ return partial_response_;
+}
+
+bool BufferedResourceLoader::network_activity() {
+ return !completed_ && !deferred_;
+}
+
+const GURL& BufferedResourceLoader::url() {
+ return url_;
+}
+
void BufferedResourceLoader::SetURLLoaderForTest(WebURLLoader* mock_loader) {
url_loader_.reset(mock_loader);
keep_test_loader_ = true;
diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h
index 12e8280..6ea6f1c 100644
--- a/webkit/glue/media/buffered_data_source.h
+++ b/webkit/glue/media/buffered_data_source.h
@@ -99,21 +99,21 @@ class BufferedResourceLoader :
// Gets the content length in bytes of the instance after this loader has been
// started. If this value is -1, then content length is unknown.
- virtual int64 content_length() { return content_length_; }
+ virtual int64 content_length();
// Gets the original size of the file requested. If this value is -1, then
// the size is unknown.
- virtual int64 instance_size() { return instance_size_; }
+ virtual int64 instance_size();
// Returns true if the response for this loader is a partial response.
// It means a 206 response in HTTP/HTTPS protocol.
- virtual bool partial_response() { return partial_response_; }
+ virtual bool partial_response();
// Returns true if network is currently active.
- virtual bool network_activity() { return !completed_ && !deferred_; }
+ virtual bool network_activity();
// Returns resulting URL.
- virtual const GURL& url() { return url_; }
+ virtual const GURL& url();
// Used to inject a mock used for unittests.
virtual void SetURLLoaderForTest(WebKit::WebURLLoader* mock_loader);
diff --git a/webkit/glue/plugins/pepper_graphics_2d.cc b/webkit/glue/plugins/pepper_graphics_2d.cc
index 7ccfae5..f051b89 100644
--- a/webkit/glue/plugins/pepper_graphics_2d.cc
+++ b/webkit/glue/plugins/pepper_graphics_2d.cc
@@ -243,6 +243,10 @@ bool Graphics2D::Init(int width, int height, bool is_always_opaque) {
return true;
}
+Graphics2D* Graphics2D::AsGraphics2D() {
+ return this;
+}
+
PP_Bool Graphics2D::Describe(PP_Size* size, PP_Bool* is_always_opaque) {
size->width = image_data_->width();
size->height = image_data_->height();
diff --git a/webkit/glue/plugins/pepper_graphics_2d.h b/webkit/glue/plugins/pepper_graphics_2d.h
index 78170ab..320209a 100644
--- a/webkit/glue/plugins/pepper_graphics_2d.h
+++ b/webkit/glue/plugins/pepper_graphics_2d.h
@@ -39,7 +39,7 @@ class Graphics2D : public Resource {
bool is_always_opaque() const { return is_always_opaque_; }
// Resource override.
- virtual Graphics2D* AsGraphics2D() { return this; }
+ virtual Graphics2D* AsGraphics2D();
// PPB_Graphics2D functions.
PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque);
diff --git a/webkit/glue/plugins/pepper_graphics_3d.cc b/webkit/glue/plugins/pepper_graphics_3d.cc
index 2dc4def..34551da 100644
--- a/webkit/glue/plugins/pepper_graphics_3d.cc
+++ b/webkit/glue/plugins/pepper_graphics_3d.cc
@@ -145,6 +145,10 @@ void Graphics3D::ResetCurrent() {
CurrentContextKey::get()->Set(NULL);
}
+Graphics3D* Graphics3D::AsGraphics3D() {
+ return this;
+}
+
Graphics3D::~Graphics3D() {
Destroy();
}
diff --git a/webkit/glue/plugins/pepper_graphics_3d.h b/webkit/glue/plugins/pepper_graphics_3d.h
index 5c00068..420a364 100644
--- a/webkit/glue/plugins/pepper_graphics_3d.h
+++ b/webkit/glue/plugins/pepper_graphics_3d.h
@@ -41,9 +41,7 @@ class Graphics3D : public Resource {
static void ResetCurrent();
// Resource override.
- virtual Graphics3D* AsGraphics3D() {
- return this;
- }
+ virtual Graphics3D* AsGraphics3D();
bool Init(PP_Instance instance_id, int32_t config,
const int32_t* attrib_list);
diff --git a/webkit/glue/plugins/pepper_image_data.cc b/webkit/glue/plugins/pepper_image_data.cc
index 7a0ecb1..13fb4ef 100644
--- a/webkit/glue/plugins/pepper_image_data.cc
+++ b/webkit/glue/plugins/pepper_image_data.cc
@@ -142,6 +142,10 @@ bool ImageData::IsImageDataFormatSupported(PP_ImageDataFormat format) {
format == PP_IMAGEDATAFORMAT_RGBA_PREMUL;
}
+ImageData* ImageData::AsImageData() {
+ return this;
+}
+
bool ImageData::Init(PP_ImageDataFormat format,
int width, int height,
bool init_to_zero) {
diff --git a/webkit/glue/plugins/pepper_image_data.h b/webkit/glue/plugins/pepper_image_data.h
index 75bead7..2c7adde 100644
--- a/webkit/glue/plugins/pepper_image_data.h
+++ b/webkit/glue/plugins/pepper_image_data.h
@@ -53,7 +53,7 @@ class ImageData : public Resource {
static bool IsImageDataFormatSupported(PP_ImageDataFormat format);
// Resource overrides.
- virtual ImageData* AsImageData() { return this; }
+ virtual ImageData* AsImageData();
// PPB_ImageData implementation.
bool Init(PP_ImageDataFormat format,
diff --git a/webkit/glue/plugins/pepper_resource.cc b/webkit/glue/plugins/pepper_resource.cc
index 851d6e7..34d6ee3 100644
--- a/webkit/glue/plugins/pepper_resource.cc
+++ b/webkit/glue/plugins/pepper_resource.cc
@@ -34,4 +34,9 @@ void Resource::StoppedTracking() {
resource_id_ = 0;
}
+#define DEFINE_TYPE_GETTER(RESOURCE) \
+ RESOURCE* Resource::As##RESOURCE() { return NULL; }
+FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER)
+#undef DEFINE_TYPE_GETTER
+
} // namespace pepper
diff --git a/webkit/glue/plugins/pepper_resource.h b/webkit/glue/plugins/pepper_resource.h
index 551b89d..3d7d307 100644
--- a/webkit/glue/plugins/pepper_resource.h
+++ b/webkit/glue/plugins/pepper_resource.h
@@ -103,7 +103,7 @@ class Resource : public base::RefCountedThreadSafe<Resource> {
// NULL if the resource does not match the specified type. Used by the Cast()
// function.
#define DEFINE_TYPE_GETTER(RESOURCE) \
- virtual RESOURCE* As##RESOURCE() { return NULL; }
+ virtual RESOURCE* As##RESOURCE();
FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER)
#undef DEFINE_TYPE_GETTER
@@ -135,7 +135,6 @@ class Resource : public base::RefCountedThreadSafe<Resource> {
FOR_ALL_RESOURCES(DEFINE_RESOURCE_CAST)
#undef DEFINE_RESOURCE_CAST
-#undef FOR_ALL_RESOURCES
} // namespace pepper
#endif // WEBKIT_GLUE_PLUGINS_PEPPER_RESOURCE_H_
diff --git a/webkit/glue/plugins/pepper_transport.cc b/webkit/glue/plugins/pepper_transport.cc
index 29a4495..f43d502 100644
--- a/webkit/glue/plugins/pepper_transport.cc
+++ b/webkit/glue/plugins/pepper_transport.cc
@@ -130,6 +130,10 @@ Transport::~Transport() {
// TODO(juberti): teardown
}
+Transport* Transport::AsTransport() {
+ return this;
+}
+
bool Transport::Init(const char* name,
const char* proto) {
// TODO(juberti): impl
diff --git a/webkit/glue/plugins/pepper_transport.h b/webkit/glue/plugins/pepper_transport.h
index fbba691..500dda0 100644
--- a/webkit/glue/plugins/pepper_transport.h
+++ b/webkit/glue/plugins/pepper_transport.h
@@ -19,9 +19,7 @@ class Transport : public Resource {
explicit Transport(PluginModule* module);
virtual ~Transport();
static const PPB_Transport_Dev* GetInterface();
- virtual Transport* AsTransport() {
- return this;
- }
+ virtual Transport* AsTransport();
bool Init(const char* name,
const char* proto);
private:
diff --git a/webkit/glue/plugins/pepper_var.cc b/webkit/glue/plugins/pepper_var.cc
index db83229..24fa2c3 100644
--- a/webkit/glue/plugins/pepper_var.cc
+++ b/webkit/glue/plugins/pepper_var.cc
@@ -652,6 +652,10 @@ Var::Var(PluginModule* module) : Resource(module) {
Var::~Var() {
}
+Var* Var::AsVar() {
+ return this;
+}
+
// static
PP_Var Var::NPVariantToPPVar(PluginModule* module, const NPVariant* variant) {
switch (variant->type) {
@@ -744,6 +748,10 @@ StringVar::StringVar(PluginModule* module, const char* str, uint32 len)
StringVar::~StringVar() {
}
+StringVar* StringVar::AsStringVar() {
+ return this;
+}
+
// static
PP_Var StringVar::StringToPPVar(PluginModule* module, const std::string& var) {
return StringToPPVar(module, var.c_str(), var.size());
@@ -785,6 +793,10 @@ ObjectVar::~ObjectVar() {
WebBindings::releaseObject(np_object_);
}
+ObjectVar* ObjectVar::AsObjectVar() {
+ return this;
+}
+
// static
PP_Var ObjectVar::NPObjectToPPVar(PluginModule* module, NPObject* object) {
scoped_refptr<ObjectVar> object_var(module->ObjectVarForNPObject(object));
diff --git a/webkit/glue/plugins/pepper_var.h b/webkit/glue/plugins/pepper_var.h
index 8929448..e59920a 100644
--- a/webkit/glue/plugins/pepper_var.h
+++ b/webkit/glue/plugins/pepper_var.h
@@ -28,7 +28,7 @@ class Var : public Resource {
virtual ~Var();
// Resource overrides.
- virtual Var* AsVar() { return this; }
+ virtual Var* AsVar();
// Returns a PP_Var that corresponds to the given NPVariant. The contents of
// the NPVariant will be copied unless the NPVariant corresponds to an
@@ -114,7 +114,7 @@ class StringVar : public Var {
const std::string& value() const { return value_; }
// Resource overrides.
- virtual StringVar* AsStringVar() { return this; }
+ virtual StringVar* AsStringVar();
// Helper function to create a PP_Var of type string that contains a copy of
// the given string. The input data must be valid UTF-8 encoded text, if it
@@ -154,7 +154,7 @@ class ObjectVar : public Var {
virtual ~ObjectVar();
// Resource overrides.
- virtual ObjectVar* AsObjectVar() { return this; }
+ virtual ObjectVar* AsObjectVar();
// Returns the underlying NPObject corresponding to this ObjectVar.
// Guaranteed non-NULL.
diff --git a/webkit/glue/plugins/plugin_stream.cc b/webkit/glue/plugins/plugin_stream.cc
index 728b180..e465e2d 100644
--- a/webkit/glue/plugins/plugin_stream.cc
+++ b/webkit/glue/plugins/plugin_stream.cc
@@ -244,6 +244,10 @@ bool PluginStream::Close(NPReason reason) {
return true;
}
+webkit_glue::WebPluginResourceClient* PluginStream::AsResourceClient() {
+ return NULL;
+}
+
void PluginStream::Notify(NPReason reason) {
if (notify_needed_) {
instance_->NPP_URLNotify(stream_.url, reason, notify_data_);
diff --git a/webkit/glue/plugins/plugin_stream.h b/webkit/glue/plugins/plugin_stream.h
index b277465..c5975b4 100644
--- a/webkit/glue/plugins/plugin_stream.h
+++ b/webkit/glue/plugins/plugin_stream.h
@@ -64,9 +64,7 @@ class PluginStream : public base::RefCounted<PluginStream> {
// Close the stream.
virtual bool Close(NPReason reason);
- virtual webkit_glue::WebPluginResourceClient* AsResourceClient() {
- return NULL;
- }
+ virtual webkit_glue::WebPluginResourceClient* AsResourceClient();
// Cancels any HTTP requests initiated by the stream.
virtual void CancelRequest() {}
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index 830a1942..13c448e 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -505,6 +505,14 @@ int WebMediaPlayerImpl::dataRate() const {
return 0;
}
+WebKit::WebMediaPlayer::NetworkState WebMediaPlayerImpl::networkState() const {
+ return network_state_;
+}
+
+WebKit::WebMediaPlayer::ReadyState WebMediaPlayerImpl::readyState() const {
+ return ready_state_;
+}
+
const WebKit::WebTimeRanges& WebMediaPlayerImpl::buffered() {
DCHECK(MessageLoop::current() == main_loop_);
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index d1f73a0..8aa6661 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -226,12 +226,8 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// Internal states of loading and network.
// TODO(hclam): Ask the pipeline about the state rather than having reading
// them from members which would cause race conditions.
- virtual WebKit::WebMediaPlayer::NetworkState networkState() const {
- return network_state_;
- }
- virtual WebKit::WebMediaPlayer::ReadyState readyState() const {
- return ready_state_;
- }
+ virtual WebKit::WebMediaPlayer::NetworkState networkState() const;
+ virtual WebKit::WebMediaPlayer::ReadyState readyState() const;
virtual unsigned long long bytesLoaded() const;
virtual unsigned long long totalBytes() const;