| OLD | NEW |
| 1 // Copyright (c) 2011 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/views/notifications/balloon_view_host.h" | 5 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" |
| 6 | 6 |
| 7 #include "chrome/browser/notifications/balloon.h" | 7 #include "chrome/browser/notifications/balloon.h" |
| 8 #include "content/browser/renderer_host/render_view_host.h" | 8 #include "content/browser/renderer_host/render_view_host.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_view.h" | |
| 10 #include "content/public/browser/content_browser_client.h" | 9 #include "content/public/browser/content_browser_client.h" |
| 10 #include "content/public/browser/render_widget_host_view.h" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
| 13 | 13 |
| 14 class BalloonViewHostView : public views::NativeViewHost { | 14 class BalloonViewHostView : public views::NativeViewHost { |
| 15 public: | 15 public: |
| 16 explicit BalloonViewHostView(BalloonViewHost* host) | 16 explicit BalloonViewHostView(BalloonViewHost* host) |
| 17 : host_(host), | 17 : host_(host), |
| 18 initialized_(false) { | 18 initialized_(false) { |
| 19 } | 19 } |
| 20 | 20 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 BalloonViewHost::~BalloonViewHost() { | 43 BalloonViewHost::~BalloonViewHost() { |
| 44 Shutdown(); | 44 Shutdown(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void BalloonViewHost::Init(gfx::NativeView parent_native_view) { | 47 void BalloonViewHost::Init(gfx::NativeView parent_native_view) { |
| 48 parent_native_view_ = parent_native_view; | 48 parent_native_view_ = parent_native_view; |
| 49 BalloonHost::Init(); | 49 BalloonHost::Init(); |
| 50 | 50 |
| 51 RenderWidgetHostView* render_widget_host_view = | 51 content::RenderWidgetHostView* render_widget_host_view = |
| 52 web_contents_->GetRenderViewHost()->view(); | 52 web_contents_->GetRenderViewHost()->view(); |
| 53 | 53 |
| 54 native_host_->Attach(render_widget_host_view->GetNativeView()); | 54 native_host_->Attach(render_widget_host_view->GetNativeView()); |
| 55 } | 55 } |
| OLD | NEW |