summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/panel_browser_view.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-29 01:22:39 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-29 01:22:39 +0000
commit17635d02534099d1934d83db0b2fe77fe1a9ed0a (patch)
tree060e506d2cd328d7ed16a6cae787bb3f66c9d9bb /chrome/browser/chromeos/panel_browser_view.cc
parentb86f7011ca51378db1d9a8f8541a01db9324980a (diff)
downloadchromium_src-17635d02534099d1934d83db0b2fe77fe1a9ed0a.zip
chromium_src-17635d02534099d1934d83db0b2fe77fe1a9ed0a.tar.gz
chromium_src-17635d02534099d1934d83db0b2fe77fe1a9ed0a.tar.bz2
Refactor panel controller so that notification window can use panel_controller.
BUG=none TEST=none Review URL: http://codereview.chromium.org/548194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/panel_browser_view.cc')
-rw-r--r--chrome/browser/chromeos/panel_browser_view.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/panel_browser_view.cc b/chrome/browser/chromeos/panel_browser_view.cc
index 19501c8..3981af5 100644
--- a/chrome/browser/chromeos/panel_browser_view.cc
+++ b/chrome/browser/chromeos/panel_browser_view.cc
@@ -13,6 +13,9 @@ PanelBrowserView::PanelBrowserView(Browser* browser)
: BrowserView(browser) {
}
+////////////////////////////////////////////////////////////////////////////////
+// BrowserView overrides.
+
void PanelBrowserView::Init() {
BrowserView::Init();
// The visibility of toolbar is controlled in
@@ -31,7 +34,8 @@ void PanelBrowserView::Init() {
}
void PanelBrowserView::Show() {
- panel_controller_.reset(new chromeos::PanelController(this));
+ panel_controller_.reset(
+ new chromeos::PanelController(this, GetNativeHandle(), bounds()));
BrowserView::Show();
}
@@ -57,4 +61,19 @@ void PanelBrowserView::ActivationChanged(bool activated) {
}
}
+////////////////////////////////////////////////////////////////////////////////
+// PanelController::Delegate overrides.
+
+string16 PanelBrowserView::GetPanelTitle() {
+ return browser()->GetWindowTitleForCurrentTab();
+}
+
+SkBitmap PanelBrowserView::GetPanelIcon() {
+ return browser()->GetCurrentPageIcon();
+}
+
+void PanelBrowserView::ClosePanel() {
+ Close();
+}
+
} // namespace chromeos