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

Side by Side Diff: chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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/gtk/notifications/balloon_view_host_gtk.h"
6
7 #include <gtk/gtk.h>
8
9 #include "chrome/browser/notifications/balloon.h"
10 #include "content/public/browser/render_view_host.h"
11 #include "content/public/browser/render_widget_host_view.h"
12 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_contents_view.h"
14
15 BalloonViewHost::BalloonViewHost(Balloon* balloon)
16 : BalloonHost(balloon) {
17 }
18
19 BalloonViewHost::~BalloonViewHost() {
20 Shutdown();
21 }
22
23 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
24 content::RenderViewHost* host = web_contents_->GetRenderViewHost();
25 if (host) {
26 content::RenderWidgetHostView* view = host->GetView();
27 if (view)
28 view->SetSize(new_size);
29 }
30
31 gtk_widget_set_size_request(
32 native_view(), new_size.width(), new_size.height());
33 }
34
35 gfx::NativeView BalloonViewHost::native_view() const {
36 return web_contents_->GetView()->GetNativeView();
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698