diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 22:14:39 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 22:14:39 +0000 |
commit | d19ee3444d4c8042a97bd653e57c775206a04bed (patch) | |
tree | 89f0e3822bab8f163ec99ff4dde6a48cd529d54b /chrome/browser/cocoa/notifications | |
parent | 4cb6dca5bcdabfa14f067f741243ca4fcda0b833 (diff) | |
download | chromium_src-d19ee3444d4c8042a97bd653e57c775206a04bed.zip chromium_src-d19ee3444d4c8042a97bd653e57c775206a04bed.tar.gz chromium_src-d19ee3444d4c8042a97bd653e57c775206a04bed.tar.bz2 |
Add notification processes to the task manager.
BUG=29332
TEST=notifications in task manager
Review URL: http://codereview.chromium.org/1610006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/notifications')
5 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/notifications/balloon_controller.h b/chrome/browser/cocoa/notifications/balloon_controller.h index d71c8e3..3cff471 100644 --- a/chrome/browser/cocoa/notifications/balloon_controller.h +++ b/chrome/browser/cocoa/notifications/balloon_controller.h @@ -65,6 +65,9 @@ // The current size of the view, possibly subject to an animation completing. - (int)desiredTotalWidth; - (int)desiredTotalHeight; + +// The BalloonHost +- (BalloonViewHost*)getHost; @end @interface BalloonController (UnitTesting) diff --git a/chrome/browser/cocoa/notifications/balloon_controller.mm b/chrome/browser/cocoa/notifications/balloon_controller.mm index f452cb4..d8a42ca 100644 --- a/chrome/browser/cocoa/notifications/balloon_controller.mm +++ b/chrome/browser/cocoa/notifications/balloon_controller.mm @@ -237,6 +237,11 @@ const int kDefaultShelfHeight = 22; [self shelfHeight]; } +// Returns the BalloonHost { +- (BalloonViewHost*) getHost { + return htmlContents_.get(); +} + // Relative to the lower left of the frame, above the shelf. - (NSPoint)contentsOffset { return NSMakePoint(kLeftShadowWidth + kLeftMargin, diff --git a/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm index 7f48b1e..c7b565c 100644 --- a/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm +++ b/chrome/browser/cocoa/notifications/balloon_controller_unittest.mm @@ -24,6 +24,12 @@ class MockBalloonCollection : public BalloonCollection { virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size) {}; virtual void DisplayChanged() {} virtual void OnBalloonClosed(Balloon* source) {}; + virtual const Balloons& GetActiveBalloons() { + NOTREACHED(); + return balloons_; + } + private: + Balloons balloons_; }; class BalloonControllerTest : public RenderViewHostTestHarness { diff --git a/chrome/browser/cocoa/notifications/balloon_view_bridge.h b/chrome/browser/cocoa/notifications/balloon_view_bridge.h index 5c4b927..fee9312 100644 --- a/chrome/browser/cocoa/notifications/balloon_view_bridge.h +++ b/chrome/browser/cocoa/notifications/balloon_view_bridge.h @@ -23,6 +23,7 @@ class BalloonViewBridge : public BalloonView { virtual void RepositionToBalloon(); virtual void Close(bool by_user); virtual gfx::Size GetSize() const; + virtual BalloonHost* GetHost() const; private: // Weak pointer to the balloon controller which manages the UI. diff --git a/chrome/browser/cocoa/notifications/balloon_view_bridge.mm b/chrome/browser/cocoa/notifications/balloon_view_bridge.mm index 89d2f39..9edf952 100644 --- a/chrome/browser/cocoa/notifications/balloon_view_bridge.mm +++ b/chrome/browser/cocoa/notifications/balloon_view_bridge.mm @@ -34,3 +34,6 @@ void BalloonViewBridge::Show(Balloon* balloon) { [controller_ showWindow:nil]; } +BalloonHost* BalloonViewBridge::GetHost() const { + return [controller_ getHost]; +} |