diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 23:46:33 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 23:46:33 +0000 |
commit | 71b68126dfbd5f25a2bc01438ddc42a9ec60f5be (patch) | |
tree | 081530c9a8105bab20deab6ad5881885cc40f8ad /chrome | |
parent | 4e2b46857273c996b027d78353687281ffb3c9d8 (diff) | |
download | chromium_src-71b68126dfbd5f25a2bc01438ddc42a9ec60f5be.zip chromium_src-71b68126dfbd5f25a2bc01438ddc42a9ec60f5be.tar.gz chromium_src-71b68126dfbd5f25a2bc01438ddc42a9ec60f5be.tar.bz2 |
views: Cleanup TabbedPane class.
BUG=None
TEST=views_examples, and existing views_unittests
R=sky@chromium.org
Review URL: http://codereview.chromium.org/6685039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78775 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/chromeos/options/network_config_view.h | 4 | ||||
-rw-r--r-- | chrome/browser/ui/views/collected_cookies_win.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/views/collected_cookies_win.h | 52 |
3 files changed, 31 insertions, 30 deletions
diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h index 4a2daa8..d3de6bb 100644 --- a/chrome/browser/chromeos/options/network_config_view.h +++ b/chrome/browser/chromeos/options/network_config_view.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -7,11 +7,9 @@ #pragma once #include "chrome/browser/chromeos/cros/network_library.h" -#include "views/controls/tabbed_pane/tabbed_pane.h" #include "views/window/dialog_delegate.h" namespace views { -class TabbedPane; class View; class Window; } diff --git a/chrome/browser/ui/views/collected_cookies_win.cc b/chrome/browser/ui/views/collected_cookies_win.cc index b067eab..316db23 100644 --- a/chrome/browser/ui/views/collected_cookies_win.cc +++ b/chrome/browser/ui/views/collected_cookies_win.cc @@ -20,6 +20,7 @@ #include "views/controls/image_view.h" #include "views/controls/label.h" #include "views/controls/separator.h" +#include "views/controls/tabbed_pane/tabbed_pane.h" #include "views/layout/box_layout.h" #include "views/layout/grid_layout.h" #include "views/layout/layout_constants.h" @@ -214,7 +215,7 @@ void CollectedCookiesWin::Init() { tabbed_pane->AddTab(label_allowed, CreateAllowedPane()); tabbed_pane->AddTab(label_blocked, CreateBlockedPane()); tabbed_pane->SelectTabAt(0); - tabbed_pane->SetListener(this); + tabbed_pane->set_listener(this); layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); layout->StartRow(0, single_column_with_padding_layout_id); @@ -390,7 +391,7 @@ void CollectedCookiesWin::ButtonPressed(views::Button* sender, } /////////////////////////////////////////////////////////////////////////////// -// views::TabbedPane::Listener implementation. +// views::TabbedPaneListener implementation. void CollectedCookiesWin::TabSelectedAt(int index) { EnableControls(); diff --git a/chrome/browser/ui/views/collected_cookies_win.h b/chrome/browser/ui/views/collected_cookies_win.h index 355583c..a578d45 100644 --- a/chrome/browser/ui/views/collected_cookies_win.h +++ b/chrome/browser/ui/views/collected_cookies_win.h @@ -2,17 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This is the Views implementation of the collected Cookies dialog. - #ifndef CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_WIN_H_ #define CHROME_BROWSER_UI_VIEWS_COLLECTED_COOKIES_WIN_H_ #pragma once +#include "base/compiler_specific.h" #include "chrome/common/content_settings.h" #include "content/browser/tab_contents/constrained_window.h" #include "content/common/notification_observer.h" #include "content/common/notification_registrar.h" -#include "views/controls/tabbed_pane/tabbed_pane.h" +#include "views/controls/tabbed_pane/tabbed_pane_listener.h" #include "views/controls/tree/tree_view.h" #include "views/window/dialog_delegate.h" @@ -21,42 +20,45 @@ class CookieInfoView; class CookiesTreeModel; class InfobarView; class TabContents; + namespace views { class Label; class NativeButton; } +// This is the Views implementation of the collected cookies dialog. +// // CollectedCookiesWin is a dialog that displays the allowed and blocked -// cookies of the current tab contents. To display the dialog, invoke +// cookies of the current tab contents. To display the dialog, invoke // ShowCollectedCookiesDialog() on the delegate of the tab contents. - class CollectedCookiesWin : public ConstrainedDialogDelegate, - NotificationObserver, - views::ButtonListener, - views::TabbedPane::Listener, - views::TreeViewController, - views::View { + public NotificationObserver, + public views::ButtonListener, + public views::TabbedPaneListener, + public views::TreeViewController, + public views::View { public: // Use BrowserWindow::ShowCollectedCookiesDialog to show. CollectedCookiesWin(gfx::NativeWindow parent_window, TabContents* tab_contents); - // ConstrainedDialogDelegate implementation. - virtual std::wstring GetWindowTitle() const; - virtual int GetDialogButtons() const; + // ConstrainedDialogDelegate: + virtual std::wstring GetWindowTitle() const OVERRIDE; + virtual int GetDialogButtons() const OVERRIDE; virtual std::wstring GetDialogButtonLabel( - MessageBoxFlags::DialogButton button) const; - virtual void DeleteDelegate(); - virtual bool Cancel(); - virtual views::View* GetContentsView(); + MessageBoxFlags::DialogButton button) const OVERRIDE; + virtual void DeleteDelegate() OVERRIDE; + virtual bool Cancel() OVERRIDE; + virtual views::View* GetContentsView() OVERRIDE; - // views::ButtonListener implementation. - virtual void ButtonPressed(views::Button* sender, const views::Event& event); + // views::ButtonListener: + virtual void ButtonPressed(views::Button* sender, + const views::Event& event) OVERRIDE; - // views::TabbedPane::Listener implementation. + // views::TabbedPaneListener: virtual void TabSelectedAt(int index); - // views::TreeViewController implementation. + // views::TreeViewController: virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view); private: @@ -74,10 +76,10 @@ class CollectedCookiesWin : public ConstrainedDialogDelegate, void AddContentException(views::TreeView* tree_view, ContentSetting setting); - // Notification Observer implementation. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + // NotificationObserver: + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details) OVERRIDE; NotificationRegistrar registrar_; |