Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.mm

Issue 23361031: [Mac] Delete old balloon and Notification Center notification implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.h"
6
7 #import <Cocoa/Cocoa.h>
8
9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/web_contents.h"
11 #include "content/public/browser/web_contents_view.h"
12
13 BalloonViewHost::BalloonViewHost(Balloon* balloon)
14 : BalloonHost(balloon) {
15 }
16
17 BalloonViewHost::~BalloonViewHost() {
18 Shutdown();
19 }
20
21 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
22 web_contents_->GetView()->SizeContents(new_size);
23 NSView* view = native_view();
24 NSRect frame = [view frame];
25 frame.size.width = new_size.width();
26 frame.size.height = new_size.height();
27
28 [view setFrame:frame];
29 [view setNeedsDisplay:YES];
30 }
31
32 gfx::NativeView BalloonViewHost::native_view() const {
33 return web_contents_->GetView()->GetContentNativeView();
34 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/notifications/balloon_view_host_mac.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698