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

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

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h" 5 #include "chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "chrome/browser/notifications/balloon.h" 9 #include "chrome/browser/notifications/balloon.h"
10 #include "content/browser/renderer_host/render_view_host.h" 10 #include "content/browser/renderer_host/render_view_host.h"
11 #include "content/public/browser/render_widget_host_view.h" 11 #include "content/public/browser/render_widget_host_view.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 13
14 BalloonViewHost::BalloonViewHost(Balloon* balloon) 14 BalloonViewHost::BalloonViewHost(Balloon* balloon)
15 : BalloonHost(balloon) { 15 : BalloonHost(balloon) {
16 } 16 }
17 17
18 BalloonViewHost::~BalloonViewHost() { 18 BalloonViewHost::~BalloonViewHost() {
19 Shutdown(); 19 Shutdown();
20 } 20 }
21 21
22 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) { 22 void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
23 RenderViewHost* host = web_contents_->GetRenderViewHost(); 23 RenderViewHost* host = web_contents_->GetRenderViewHost();
24 if (host) { 24 if (host) {
25 content::RenderWidgetHostView* view = host->view(); 25 content::RenderWidgetHostView* view = host->GetView();
26 if (view) 26 if (view)
27 view->SetSize(new_size); 27 view->SetSize(new_size);
28 } 28 }
29 29
30 gtk_widget_set_size_request( 30 gtk_widget_set_size_request(
31 native_view(), new_size.width(), new_size.height()); 31 native_view(), new_size.width(), new_size.height());
32 } 32 }
33 33
34 gfx::NativeView BalloonViewHost::native_view() const { 34 gfx::NativeView BalloonViewHost::native_view() const {
35 return web_contents_->GetNativeView(); 35 return web_contents_->GetNativeView();
36 } 36 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc ('k') | chrome/browser/ui/login/login_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698