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

Unified Diff: chrome/browser/ui/views/notifications/balloon_view_host.cc

Issue 231213003: notification balloons: Remove views and cocoa implementations of BalloonCollection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/notifications/balloon_view_host.cc
diff --git a/chrome/browser/ui/views/notifications/balloon_view_host.cc b/chrome/browser/ui/views/notifications/balloon_view_host.cc
deleted file mode 100644
index c107dc7ad9577a202f439b9fa07a366b3718f600..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/notifications/balloon_view_host.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/notifications/balloon_view_host.h"
-
-#include "chrome/browser/notifications/balloon.h"
-#include "content/public/browser/content_browser_client.h"
-#include "content/public/browser/render_view_host.h"
-#include "content/public/browser/render_widget_host_view.h"
-#include "content/public/browser/web_contents.h"
-#include "ui/views/widget/widget.h"
-
-class BalloonViewHostView : public views::NativeViewHost {
- public:
- explicit BalloonViewHostView(BalloonViewHost* host)
- : host_(host),
- initialized_(false) {
- }
-
- virtual void ViewHierarchyChanged(
- const ViewHierarchyChangedDetails& details) OVERRIDE {
- NativeViewHost::ViewHierarchyChanged(details);
- if (details.is_add && GetWidget() && !initialized_) {
- initialized_ = true;
- host_->Init(GetWidget()->GetNativeView());
- }
- }
-
- private:
- // The host owns this object.
- BalloonViewHost* host_;
-
- bool initialized_;
-};
-
-BalloonViewHost::BalloonViewHost(Balloon* balloon)
- : BalloonHost(balloon) {
- native_host_ = new BalloonViewHostView(this);
-}
-
-BalloonViewHost::~BalloonViewHost() {
- Shutdown();
-}
-
-void BalloonViewHost::Init(gfx::NativeView parent_native_view) {
- parent_native_view_ = parent_native_view;
- BalloonHost::Init();
-
- content::RenderWidgetHostView* render_widget_host_view =
- web_contents_->GetRenderViewHost()->GetView();
-
- native_host_->Attach(render_widget_host_view->GetNativeView());
-}
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view_host.h ('k') | chrome/browser/ui/views/notifications/balloon_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698