Disable TabDragController tests that fail with a real compositor.
[chromium-blink-merge.git] / chrome / browser / ui / gtk / notifications / balloon_view_host_gtk.cc
blobdba6a1b487e3e4738a2d92a5e27ec1338c0d2740
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.
5 #include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h"
7 #include <gtk/gtk.h>
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"
15 BalloonViewHost::BalloonViewHost(Balloon* balloon)
16 : BalloonHost(balloon) {
19 BalloonViewHost::~BalloonViewHost() {
20 Shutdown();
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);
31 gtk_widget_set_size_request(
32 native_view(), new_size.width(), new_size.height());
35 gfx::NativeView BalloonViewHost::native_view() const {
36 return web_contents_->GetView()->GetNativeView();