summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/panels
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/panels')
-rw-r--r--chrome/browser/ui/panels/base_panel_browser_test.cc6
-rw-r--r--chrome/browser/ui/panels/panel.cc13
-rw-r--r--chrome/browser/ui/panels/panel.h14
-rw-r--r--chrome/browser/ui/panels/panel_app_browsertest.cc2
-rw-r--r--chrome/browser/ui/panels/panel_browser_view.cc4
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm6
-rw-r--r--chrome/browser/ui/panels/panel_browser_window_gtk.cc6
-rw-r--r--chrome/browser/ui/panels/panel_browsertest.cc12
-rw-r--r--chrome/browser/ui/panels/panel_window_controller_cocoa.mm6
9 files changed, 35 insertions, 34 deletions
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index ad6e2ff..187298d 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -191,7 +191,7 @@ void BasePanelBrowserTest::WaitForPanelActiveState(
expected_state == SHOW_AS_INACTIVE);
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(panel));
+ content::Source<Panel>(panel));
if (panel->IsActive() == (expected_state == SHOW_AS_ACTIVE))
return; // Already in required state.
signal.Wait();
@@ -204,7 +204,7 @@ void BasePanelBrowserTest::WaitForWindowSizeAvailable(Panel* panel) {
NativePanelTesting::Create(panel->native_panel()));
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_PANEL_WINDOW_SIZE_KNOWN,
- Source<Panel>(panel));
+ content::Source<Panel>(panel));
if (panel_testing->IsWindowSizeKnown())
return;
signal.Wait();
@@ -216,7 +216,7 @@ void BasePanelBrowserTest::WaitForBoundsAnimationFinished(Panel* panel) {
NativePanelTesting::Create(panel->native_panel()));
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel));
+ content::Source<Panel>(panel));
if (!panel_testing->IsAnimatingBounds())
return;
signal.Wait();
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 08c1a76c..74e1f1a 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -40,7 +40,7 @@ Panel::Panel(Browser* browser, const gfx::Rect& bounds)
registrar_.Add(this,
content::NOTIFICATION_TAB_ADDED,
- Source<TabContentsDelegate>(browser));
+ content::Source<TabContentsDelegate>(browser));
}
Panel::~Panel() {
@@ -528,8 +528,8 @@ void Panel::ShowAvatarBubble(TabContents* tab_contents, const gfx::Rect& rect) {
}
void Panel::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_TAB_ADDED:
// We also need to know when the render view host changes in order
@@ -537,9 +537,10 @@ void Panel::Observe(int type,
// render view host. However, we cannot register for
// NOTIFICATION_TAB_CONTENTS_SWAPPED until we actually have a
// tab content so we register for it here.
- registrar_.Add(this,
- content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
- Source<TabContents>(browser()->GetSelectedTabContents()));
+ registrar_.Add(
+ this,
+ content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
+ content::Source<TabContents>(browser()->GetSelectedTabContents()));
// Fall-thru to update render view host.
case content::NOTIFICATION_TAB_CONTENTS_SWAPPED: {
diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h
index ffdc44e..b646b9b 100644
--- a/chrome/browser/ui/panels/panel.h
+++ b/chrome/browser/ui/panels/panel.h
@@ -10,8 +10,8 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/rect.h"
class NativePanel;
@@ -28,7 +28,7 @@ class RenderViewHost;
// Panel size is restricted to certain limits.
// - Invoke an appropriate PanelManager function to do stuff that might affect
// other Panels. For example deleting a panel would rearrange other panels.
-class Panel : public BrowserWindow, public NotificationObserver {
+class Panel : public BrowserWindow, public content::NotificationObserver {
public:
enum ExpansionState {
// The panel is fully expanded with both title-bar and the client-area.
@@ -168,10 +168,10 @@ class Panel : public BrowserWindow, public NotificationObserver {
virtual void ShowAvatarBubble(TabContents* tab_contents,
const gfx::Rect& rect) OVERRIDE;
- // NotificationObserver overrides.
+ // content::NotificationObserver overrides.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Construct a native panel BrowserWindow implementation for the specified
// |browser|.
@@ -238,7 +238,7 @@ class Panel : public BrowserWindow, public NotificationObserver {
// been minimized.
int restored_height_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(Panel);
};
diff --git a/chrome/browser/ui/panels/panel_app_browsertest.cc b/chrome/browser/ui/panels/panel_app_browsertest.cc
index 03f696b..50d8e79 100644
--- a/chrome/browser/ui/panels/panel_app_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_app_browsertest.cc
@@ -61,7 +61,7 @@ class PanelAppBrowserTest : public ExtensionBrowserTest {
size_t browser_count = BrowserList::size();
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
browser->CloseWindow();
signal.Wait();
// Now we have one less browser instance.
diff --git a/chrome/browser/ui/panels/panel_browser_view.cc b/chrome/browser/ui/panels/panel_browser_view.cc
index 4e49ff4..746e47c 100644
--- a/chrome/browser/ui/panels/panel_browser_view.cc
+++ b/chrome/browser/ui/panels/panel_browser_view.cc
@@ -178,7 +178,7 @@ void PanelBrowserView::OnWidgetActivationChanged(views::Widget* widget,
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(panel()),
+ content::Source<Panel>(panel()),
NotificationService::NoDetails());
}
@@ -199,7 +199,7 @@ bool PanelBrowserView::AcceleratorPressed(
void PanelBrowserView::AnimationEnded(const ui::Animation* animation) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel()),
+ content::Source<Panel>(panel()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm b/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm
index 87c841c..9b4648d 100644
--- a/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm
+++ b/chrome/browser/ui/panels/panel_browser_window_cocoa_unittest.mm
@@ -35,7 +35,7 @@ class PanelAnimatedBoundsObserver :
PanelAnimatedBoundsObserver(Panel* panel)
: ui_test_utils::WindowedNotificationObserver(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel)) { }
+ content::Source<Panel>(panel)) { }
virtual ~PanelAnimatedBoundsObserver() { }
};
@@ -105,7 +105,7 @@ class PanelBrowserWindowCocoaTest : public CocoaProfileTest {
size_t browser_count = BrowserList::size();
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
browser->CloseWindow();
signal.Wait();
// Now we have one less browser instance.
@@ -290,7 +290,7 @@ TEST_F(PanelBrowserWindowCocoaTest, TitlebarViewClose) {
// Simulate clicking Close Button and wait until the Panel closes.
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel->browser()));
+ content::Source<Browser>(panel->browser()));
[titlebar simulateCloseButtonClick];
signal.Wait();
EXPECT_EQ(0, manager->num_panels());
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index 482b24c..4c8f9f0 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -150,7 +150,7 @@ void PanelBrowserWindowGtk::OnSizeChanged(int width, int height) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_WINDOW_SIZE_KNOWN,
- Source<Panel>(panel_.get()),
+ content::Source<Panel>(panel_.get()),
NotificationService::NoDetails());
}
@@ -198,7 +198,7 @@ void PanelBrowserWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(panel_.get()),
+ content::Source<Panel>(panel_.get()),
NotificationService::NoDetails());
}
@@ -430,7 +430,7 @@ void PanelBrowserWindowGtk::DidProcessEvent(GdkEvent* event) {
void PanelBrowserWindowGtk::AnimationEnded(const ui::Animation* animation) {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(panel_.get()),
+ content::Source<Panel>(panel_.get()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index f2cb6f6..7804a73 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -40,7 +40,7 @@ class PanelBrowserTest : public BasePanelBrowserTest {
size_t browser_count = BrowserList::size();
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser));
+ content::Source<Browser>(browser));
browser->CloseWindow();
signal.Wait();
// Now we have one less browser instance.
@@ -83,7 +83,7 @@ class PanelBrowserTest : public BasePanelBrowserTest {
// Test closing the leftmost panel that is from same extension.
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel2->browser()));
+ content::Source<Browser>(panel2->browser()));
Panel* panel4 = CreatePanelWithBounds(
web_app::GenerateApplicationNameFromExtensionId(extension2->id()),
gfx::Rect(0, 0, 280, 200));
@@ -95,7 +95,7 @@ class PanelBrowserTest : public BasePanelBrowserTest {
// Test closing the leftmost panel.
ui_test_utils::WindowedNotificationObserver signal2(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel4->browser()));
+ content::Source<Browser>(panel4->browser()));
Panel* panel5 = CreatePanelWithBounds(
web_app::GenerateApplicationNameFromExtensionId(extension3->id()),
gfx::Rect(0, 0, 300, 200));
@@ -107,10 +107,10 @@ class PanelBrowserTest : public BasePanelBrowserTest {
// Test closing 2 leftmost panels.
ui_test_utils::WindowedNotificationObserver signal3(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel3->browser()));
+ content::Source<Browser>(panel3->browser()));
ui_test_utils::WindowedNotificationObserver signal4(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(panel5->browser()));
+ content::Source<Browser>(panel5->browser()));
Panel* panel6 = CreatePanelWithBounds(
web_app::GenerateApplicationNameFromExtensionId(extension3->id()),
gfx::Rect(0, 0, 500, 200));
@@ -1316,7 +1316,7 @@ IN_PROC_BROWSER_TEST_F(PanelDownloadTest, DownloadNoTabbedBrowser) {
ui_test_utils::WindowedNotificationObserver signal(
chrome::NOTIFICATION_BROWSER_CLOSED,
- Source<Browser>(browser()));
+ content::Source<Browser>(browser()));
browser()->CloseWindow();
signal.Wait();
ASSERT_EQ(1U, BrowserList::size());
diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
index 384ab84..05e0664 100644
--- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
@@ -444,7 +444,7 @@ enum {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
- Source<Panel>(windowShim_->panel()),
+ content::Source<Panel>(windowShim_->panel()),
NotificationService::NoDetails());
}
@@ -514,7 +514,7 @@ enum {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(windowShim_->panel()),
+ content::Source<Panel>(windowShim_->panel()),
NotificationService::NoDetails());
}
@@ -536,7 +536,7 @@ enum {
NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_ACTIVE_STATUS,
- Source<Panel>(windowShim_->panel()),
+ content::Source<Panel>(windowShim_->panel()),
NotificationService::NoDetails());
}