Commit b763aba3 authored by tfarina@chromium.org's avatar tfarina@chromium.org

views: Forward declare more classes in balloon_view_views.h.

R=pkasting@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10832107

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150051 0039d316-1c4b-4281-b951-d872f2087c98
parent d2a13318
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_collection.h" #include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification.h"
...@@ -30,10 +29,12 @@ ...@@ -30,10 +29,12 @@
#include "ui/gfx/canvas.h" #include "ui/gfx/canvas.h"
#include "ui/gfx/insets.h" #include "ui/gfx/insets.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
#include "ui/gfx/path.h"
#include "ui/views/bubble/bubble_border.h" #include "ui/views/bubble/bubble_border.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/button/text_button.h" #include "ui/views/controls/button/text_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/menu/menu_item_view.h" #include "ui/views/controls/menu/menu_item_view.h"
#include "ui/views/controls/menu/menu_model_adapter.h" #include "ui/views/controls/menu/menu_model_adapter.h"
#include "ui/views/controls/menu/menu_runner.h" #include "ui/views/controls/menu/menu_runner.h"
...@@ -47,8 +48,6 @@ ...@@ -47,8 +48,6 @@
#include "chrome/browser/ui/views/notifications/balloon_view_host.h" #include "chrome/browser/ui/views/notifications/balloon_view_host.h"
#endif #endif
using views::Widget;
namespace { namespace {
const int kTopMargin = 2; const int kTopMargin = 2;
...@@ -358,14 +357,14 @@ void BalloonViewImpl::Show(Balloon* balloon) { ...@@ -358,14 +357,14 @@ void BalloonViewImpl::Show(Balloon* balloon) {
if (enable_web_ui_) if (enable_web_ui_)
html_contents_->EnableWebUI(); html_contents_->EnableWebUI();
html_container_ = new Widget; html_container_ = new views::Widget;
Widget::InitParams params(Widget::InitParams::TYPE_POPUP); views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
params.bounds = contents_rect; params.bounds = contents_rect;
html_container_->Init(params); html_container_->Init(params);
html_container_->SetContentsView(html_contents_->view()); html_container_->SetContentsView(html_contents_->view());
gfx::Rect balloon_rect(x(), y(), GetTotalWidth(), GetTotalHeight()); gfx::Rect balloon_rect(x(), y(), GetTotalWidth(), GetTotalHeight());
frame_container_ = new Widget; frame_container_ = new views::Widget;
params.delegate = this; params.delegate = this;
params.transparent = true; params.transparent = true;
params.bounds = balloon_rect; params.bounds = balloon_rect;
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Draws the view for the balloons.
#ifndef CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_VIEWS_H_ #ifndef CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_VIEWS_H_ #define CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_VIEWS_H_
...@@ -11,29 +9,30 @@ ...@@ -11,29 +9,30 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "chrome/browser/notifications/balloon.h" #include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/ui/views/notifications/balloon_view_host.h" #include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_registrar.h"
#include "ui/base/animation/animation_delegate.h" #include "ui/base/animation/animation_delegate.h"
#include "ui/gfx/path.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
#include "ui/gfx/size.h" #include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/menu_button.h"
#include "ui/views/controls/button/menu_button_listener.h" #include "ui/views/controls/button/menu_button_listener.h"
#include "ui/views/controls/label.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget_delegate.h" #include "ui/views/widget/widget_delegate.h"
class BalloonCollection; class BalloonCollection;
class BalloonViewHost;
class NotificationOptionsMenuModel; class NotificationOptionsMenuModel;
namespace gfx {
class Path;
}
namespace ui { namespace ui {
class SlideAnimation; class SlideAnimation;
} }
namespace views { namespace views {
class ButtonListener;
class ImageButton; class ImageButton;
class Label;
class MenuButton;
class MenuRunner; class MenuRunner;
} }
...@@ -74,8 +73,8 @@ class BalloonViewImpl : public BalloonView, ...@@ -74,8 +73,8 @@ class BalloonViewImpl : public BalloonView,
virtual void OnWorkAreaChanged() OVERRIDE; virtual void OnWorkAreaChanged() OVERRIDE;
// views::ButtonListener interface. // views::ButtonListener interface.
virtual void ButtonPressed( virtual void ButtonPressed(views::Button* sender,
views::Button* sender, const views::Event&) OVERRIDE; const views::Event&) OVERRIDE;
// content::NotificationObserver interface. // content::NotificationObserver interface.
virtual void Observe(int type, virtual void Observe(int type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment