diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-15 21:17:25 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-15 21:17:25 +0000 |
commit | c860605a825bc7174197182fafd3c959ce8104f8 (patch) | |
tree | ae2a750de22a457ac57f4d021776dd94f1602268 | |
parent | aa70051aaf7233dae48622851504091fd93d518e (diff) | |
download | chromium_src-c860605a825bc7174197182fafd3c959ce8104f8.zip chromium_src-c860605a825bc7174197182fafd3c959ce8104f8.tar.gz chromium_src-c860605a825bc7174197182fafd3c959ce8104f8.tar.bz2 |
cros: More method out-of-lining for clang plugin, more build fixes.
BUG=none
TEST=none
TBR=dpolukhin
Review URL: http://codereview.chromium.org/6961012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85426 0039d316-1c4b-4281-b951-d872f2087c98
18 files changed, 94 insertions, 25 deletions
diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc index b925892..25697ed 100644 --- a/chrome/browser/chromeos/locale_change_guard.cc +++ b/chrome/browser/chromeos/locale_change_guard.cc @@ -47,6 +47,8 @@ LocaleChangeGuard::LocaleChangeGuard(Profile* profile) NotificationService::AllSources()); } +LocaleChangeGuard::~LocaleChangeGuard() {} + void LocaleChangeGuard::OnLogin() { registrar_.Add(this, NotificationType::LOAD_COMPLETED_MAIN_FRAME, NotificationService::AllSources()); diff --git a/chrome/browser/chromeos/locale_change_guard.h b/chrome/browser/chromeos/locale_change_guard.h index 4bb1f38..59790d2 100644 --- a/chrome/browser/chromeos/locale_change_guard.h +++ b/chrome/browser/chromeos/locale_change_guard.h @@ -28,6 +28,7 @@ namespace chromeos { class LocaleChangeGuard : public NotificationObserver { public: explicit LocaleChangeGuard(Profile* profile); + ~LocaleChangeGuard(); // Called just before changing locale. void PrepareChangingLocale( diff --git a/chrome/browser/chromeos/login/account_creation_view.cc b/chrome/browser/chromeos/login/account_creation_view.cc index 7153ecc..61b2451 100644 --- a/chrome/browser/chromeos/login/account_creation_view.cc +++ b/chrome/browser/chromeos/login/account_creation_view.cc @@ -87,6 +87,13 @@ void AccountCreationDomView::SetAccountCreationViewDelegate( } /////////////////////////////////////////////////////////////////////////////// +// AccountCreationDomView, protected: + +WebPageDomView* AccountCreationDomView::dom_view() { + return dom_view_; +} + +/////////////////////////////////////////////////////////////////////////////// // AccountCreationDomView, DOMView implementation: TabContents* AccountCreationDomView::CreateTabContents(Profile* profile, diff --git a/chrome/browser/chromeos/login/account_creation_view.h b/chrome/browser/chromeos/login/account_creation_view.h index 40bbe31..0e1cc02 100644 --- a/chrome/browser/chromeos/login/account_creation_view.h +++ b/chrome/browser/chromeos/login/account_creation_view.h @@ -55,7 +55,7 @@ class AccountCreationView : public WebPageView { void SetAccountCreationViewDelegate(AccountCreationViewDelegate* delegate); protected: - virtual WebPageDomView* dom_view() { return dom_view_; } + virtual WebPageDomView* dom_view(); private: // View that renders page. diff --git a/chrome/browser/chromeos/login/background_view.cc b/chrome/browser/chromeos/login/background_view.cc index 9db4d5f..2f3e055 100644 --- a/chrome/browser/chromeos/login/background_view.cc +++ b/chrome/browser/chromeos/login/background_view.cc @@ -105,6 +105,8 @@ BackgroundView::BackgroundView() background_area_(NULL) { } +BackgroundView::~BackgroundView() {} + void BackgroundView::Init(const GURL& background_url) { views::Painter* painter = CreateBackgroundPainter(); set_background(views::Background::CreateBackgroundPainter(true, painter)); @@ -283,6 +285,10 @@ void BackgroundView::ChildPreferredSizeChanged(View* child) { SchedulePaint(); } +Profile* BackgroundView::GetProfile() const { + return NULL; +} + bool BackgroundView::ShouldOpenButtonOptions( const views::View* button_view) const { if (button_view == status_area_->network_view()) { diff --git a/chrome/browser/chromeos/login/background_view.h b/chrome/browser/chromeos/login/background_view.h index 0ac753c..71d6fe4 100644 --- a/chrome/browser/chromeos/login/background_view.h +++ b/chrome/browser/chromeos/login/background_view.h @@ -50,6 +50,7 @@ class BackgroundView : public views::View, }; BackgroundView(); + virtual ~BackgroundView(); // Initializes the background view. It backgroun_url is given (non empty), // it creates a DOMView background area that renders a webpage. @@ -108,7 +109,7 @@ class BackgroundView : public views::View, virtual void OnLocaleChanged() OVERRIDE; // Overridden from StatusAreaHost: - virtual Profile* GetProfile() const OVERRIDE { return NULL; } + virtual Profile* GetProfile() const OVERRIDE; virtual void ExecuteBrowserCommand(int id) const OVERRIDE {} virtual bool ShouldOpenButtonOptions( const views::View* button_view) const OVERRIDE; diff --git a/chrome/browser/chromeos/login/web_page_view.cc b/chrome/browser/chromeos/login/web_page_view.cc index 3b8d3c5..622d51b 100644 --- a/chrome/browser/chromeos/login/web_page_view.cc +++ b/chrome/browser/chromeos/login/web_page_view.cc @@ -99,6 +99,10 @@ void WebPageDomView::SetTabContentsDelegate( /////////////////////////////////////////////////////////////////////////////// // WebPageView, public: +WebPageView::WebPageView() : throbber_(NULL), connecting_label_(NULL) {} + +WebPageView::~WebPageView() {} + void WebPageView::Init() { views::Painter* painter = CreateWizardPainter( &BorderDefinition::kScreenBorder); diff --git a/chrome/browser/chromeos/login/web_page_view.h b/chrome/browser/chromeos/login/web_page_view.h index 3e3ca15..0eb303e 100644 --- a/chrome/browser/chromeos/login/web_page_view.h +++ b/chrome/browser/chromeos/login/web_page_view.h @@ -88,7 +88,8 @@ class WebPageDomView : public DOMView { // page rendered in it. While page is loaded spinner overlay is shown. class WebPageView : public views::View { public: - WebPageView() : throbber_(NULL), connecting_label_(NULL) {} + WebPageView(); + virtual ~WebPageView(); // Initialize view layout. void Init(); diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc index 1e16386..f4b28c5 100644 --- a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc +++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc @@ -133,7 +133,8 @@ void BalloonCollectionImpl::OnBalloonClosed(Balloon* source) { space_change_listener_->OnBalloonSpaceChanged(); } -const Balloons& BalloonCollectionImpl::GetActiveBalloons() { +const BalloonCollectionImpl::Balloons& + BalloonCollectionImpl::GetActiveBalloons() { return base_.balloons(); } diff --git a/chrome/browser/chromeos/proxy_config_service.cc b/chrome/browser/chromeos/proxy_config_service.cc new file mode 100644 index 0000000..62a8794 --- /dev/null +++ b/chrome/browser/chromeos/proxy_config_service.cc @@ -0,0 +1,27 @@ +// Copyright (c) 2011 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/chromeos/proxy_config_service.h" + +namespace chromeos { + +ProxyConfigService::ProxyConfigService( + const scoped_refptr<ProxyConfigServiceImpl>& impl) + : impl_(impl) { +} + +ProxyConfigService::~ProxyConfigService() {} + +void ProxyConfigService::AddObserver(Observer* observer) { + impl_->AddObserver(observer); +} +void ProxyConfigService::RemoveObserver(Observer* observer) { + impl_->RemoveObserver(observer); +} +ConfigAvailability ProxyConfigService::GetLatestProxyConfig( + net::ProxyConfig* config) { + return impl_->IOGetProxyConfig(config); +} + +} // namespace chromeos diff --git a/chrome/browser/chromeos/proxy_config_service.h b/chrome/browser/chromeos/proxy_config_service.h index 4ede781..955c775 100644 --- a/chrome/browser/chromeos/proxy_config_service.h +++ b/chrome/browser/chromeos/proxy_config_service.h @@ -15,20 +15,14 @@ namespace chromeos { // instantiated in ProfileIOData::CreateProxyConfigService. class ProxyConfigService : public net::ProxyConfigService { public: - explicit ProxyConfigService(const scoped_refptr<ProxyConfigServiceImpl>& impl) - : impl_(impl) {} - virtual ~ProxyConfigService() {} + explicit ProxyConfigService( + const scoped_refptr<ProxyConfigServiceImpl>& impl); + virtual ~ProxyConfigService(); // ProxyConfigService methods. Called from IO thread. - virtual void AddObserver(Observer* observer) { - impl_->AddObserver(observer); - } - virtual void RemoveObserver(Observer* observer) { - impl_->RemoveObserver(observer); - } - virtual ConfigAvailability GetLatestProxyConfig(net::ProxyConfig* config) { - return impl_->IOGetProxyConfig(config); - } + virtual void AddObserver(Observer* observer); + virtual void RemoveObserver(Observer* observer); + virtual ConfigAvailability GetLatestProxyConfig(net::ProxyConfig* config); private: scoped_refptr<ProxyConfigServiceImpl> impl_; diff --git a/chrome/browser/chromeos/status/input_method_menu_button.cc b/chrome/browser/chromeos/status/input_method_menu_button.cc index c0e2fdf..8b4fbc84 100644 --- a/chrome/browser/chromeos/status/input_method_menu_button.cc +++ b/chrome/browser/chromeos/status/input_method_menu_button.cc @@ -70,6 +70,8 @@ InputMethodMenuButton::InputMethodMenuButton(StatusAreaHost* host) UpdateUIFromCurrentInputMethod(); } +InputMethodMenuButton::~InputMethodMenuButton() {} + //////////////////////////////////////////////////////////////////////////////// // views::View implementation: diff --git a/chrome/browser/chromeos/status/input_method_menu_button.h b/chrome/browser/chromeos/status/input_method_menu_button.h index 9ecc105..d471e13 100644 --- a/chrome/browser/chromeos/status/input_method_menu_button.h +++ b/chrome/browser/chromeos/status/input_method_menu_button.h @@ -22,7 +22,7 @@ class InputMethodMenuButton : public StatusAreaButton, public views::ViewMenuDelegate { public: explicit InputMethodMenuButton(StatusAreaHost* host); - virtual ~InputMethodMenuButton() {} + virtual ~InputMethodMenuButton(); // views::View implementation. virtual gfx::Size GetPreferredSize(); diff --git a/chrome/browser/chromeos/status/network_menu_button.cc b/chrome/browser/chromeos/status/network_menu_button.cc index 4d647ca..947fb63 100644 --- a/chrome/browser/chromeos/status/network_menu_button.cc +++ b/chrome/browser/chromeos/status/network_menu_button.cc @@ -219,6 +219,18 @@ void NetworkMenuButton::OnLocaleChanged() { //////////////////////////////////////////////////////////////////////////////// // MessageBubbleDelegate implementation: +void NetworkMenuButton::BubbleClosing(Bubble* bubble, bool closed_by_escape) { + mobile_data_bubble_ = NULL; +} + +bool NetworkMenuButton::CloseOnEscape() { + return true; +} + +bool NetworkMenuButton::FadeInOnShow() { + return false; +} + void NetworkMenuButton::OnHelpLinkActivated() { // mobile_data_bubble_ will be set to NULL in callback. if (mobile_data_bubble_) diff --git a/chrome/browser/chromeos/status/network_menu_button.h b/chrome/browser/chromeos/status/network_menu_button.h index 0cae643..0e12f91 100644 --- a/chrome/browser/chromeos/status/network_menu_button.h +++ b/chrome/browser/chromeos/status/network_menu_button.h @@ -86,11 +86,9 @@ class NetworkMenuButton : public StatusAreaButton, virtual void OnLocaleChanged() OVERRIDE; // MessageBubbleDelegate implementation: - virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) { - mobile_data_bubble_ = NULL; - } - virtual bool CloseOnEscape() { return true; } - virtual bool FadeInOnShow() { return false; } + virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape); + virtual bool CloseOnEscape(); + virtual bool FadeInOnShow(); virtual void OnHelpLinkActivated(); private: diff --git a/chrome/browser/chromeos/status/status_area_button.cc b/chrome/browser/chromeos/status/status_area_button.cc index ec93c99..0cdbf5f 100644 --- a/chrome/browser/chromeos/status/status_area_button.cc +++ b/chrome/browser/chromeos/status/status_area_button.cc @@ -117,6 +117,18 @@ void StatusAreaButton::OnThemeChanged() { UpdateTextStyle(); } +int StatusAreaButton::icon_height() { + return 24; +} + +int StatusAreaButton::icon_width() { + return 23; +} + +int StatusAreaButton::horizontal_padding() { + return 1; +} + void StatusAreaButton::UpdateTextStyle() { ClearEmbellishing(); switch (host_->GetTextStyle()) { diff --git a/chrome/browser/chromeos/status/status_area_button.h b/chrome/browser/chromeos/status/status_area_button.h index 76754ec..84a27de 100644 --- a/chrome/browser/chromeos/status/status_area_button.h +++ b/chrome/browser/chromeos/status/status_area_button.h @@ -43,12 +43,12 @@ class StatusAreaButton : public views::MenuButton { protected: // Subclasses should override these methods to return the correct dimensions. - virtual int icon_height() { return 24; } - virtual int icon_width() { return 23; } + virtual int icon_height(); + virtual int icon_width(); // Subclasses can override this method to return more or less padding. // The padding is added to both the left and right side. - virtual int horizontal_padding() { return 1; } + virtual int horizontal_padding(); // True if the button wants to use views::MenuButton drawings. bool use_menu_button_paint_; diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 725141c..6e63639 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -658,6 +658,7 @@ 'browser/chromeos/plugin_selection_policy.h', 'browser/chromeos/preferences.cc', 'browser/chromeos/preferences.h', + 'browser/chromeos/proxy_config_service.cc', 'browser/chromeos/proxy_config_service.h', 'browser/chromeos/proxy_config_service_impl.cc', 'browser/chromeos/proxy_config_service_impl.h', |