From 26e99ffd2a4179aefe5dbf8cbd5da74c0bc7a76b Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Thu, 4 Jun 2009 02:20:21 +0000 Subject: Fix toolkit_views bustage. BUG=none TEST=none Review URL: http://codereview.chromium.org/112093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17583 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/browser_bubble.cc | 10 +++++----- chrome/browser/views/browser_bubble_gtk.cc | 8 -------- chrome/browser/views/go_button.h | 2 +- chrome/browser/views/status_bubble_views.cc | 5 ++--- 4 files changed, 8 insertions(+), 17 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/views/browser_bubble.cc b/chrome/browser/views/browser_bubble.cc index 1df878d..4736ad3 100644 --- a/chrome/browser/views/browser_bubble.cc +++ b/chrome/browser/views/browser_bubble.cc @@ -7,6 +7,7 @@ #include "app/l10n_util.h" #include "chrome/browser/views/frame/browser_view.h" #include "views/widget/root_view.h" +#include "views/window/window.h" BrowserBubble::BrowserBubble(views::View* view, views::Widget* frame, const gfx::Point& origin) @@ -37,8 +38,8 @@ void BrowserBubble::DetachFromBrowser() { if (!attached_) return; attached_ = false; - BrowserView* browser_view = - BrowserView::GetBrowserViewForNativeWindow(frame_native_view_); + BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow( + frame_->GetWindow()->GetNativeWindow()); if (browser_view) browser_view->DetachBrowserBubble(this); } @@ -47,8 +48,8 @@ void BrowserBubble::AttachToBrowser() { DCHECK(!attached_); if (attached_) return; - BrowserView* browser_view = - BrowserView::GetBrowserViewForNativeWindow(frame_native_view_); + BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow( + frame_->GetWindow()->GetNativeWindow()); DCHECK(browser_view); if (browser_view) { browser_view->AttachBrowserBubble(this); @@ -99,4 +100,3 @@ void BrowserBubble::ResizeToView() { gfx::Size size = view_->GetPreferredSize(); SetBounds(bounds_.x(), bounds_.y(), size.width(), size.height()); } - diff --git a/chrome/browser/views/browser_bubble_gtk.cc b/chrome/browser/views/browser_bubble_gtk.cc index 91fea0c..bc717ab 100644 --- a/chrome/browser/views/browser_bubble_gtk.cc +++ b/chrome/browser/views/browser_bubble_gtk.cc @@ -26,14 +26,6 @@ void BrowserBubble::InitPopup() { browser_view->AttachBrowserBubble(this); } -void BrowserBubble::DestroyPopup() { - gfx::NativeWindow native_window = frame_->GetWindow()->GetNativeWindow(); - BrowserView* browser_view = - BrowserView::GetBrowserViewForNativeWindow(native_window); - if (browser_view) - browser_view->DetachBrowserBubble(this); -} - void BrowserBubble::MovePopup(int x, int y, int w, int h) { views::WidgetGtk* pop = static_cast(popup_.get()); pop->SetBounds(gfx::Rect(x, y, w, h)); diff --git a/chrome/browser/views/go_button.h b/chrome/browser/views/go_button.h index 818999c..1f1136b 100644 --- a/chrome/browser/views/go_button.h +++ b/chrome/browser/views/go_button.h @@ -27,7 +27,7 @@ class LocationBarView; class GoButton : public views::ToggleImageButton, public views::ButtonListener { public: - typedef enum Mode { MODE_GO = 0, MODE_STOP }; + enum Mode { MODE_GO = 0, MODE_STOP }; GoButton(LocationBarView* location_bar, Browser* Browser); virtual ~GoButton(); diff --git a/chrome/browser/views/status_bubble_views.cc b/chrome/browser/views/status_bubble_views.cc index 678aa6b..49462bf 100644 --- a/chrome/browser/views/status_bubble_views.cc +++ b/chrome/browser/views/status_bubble_views.cc @@ -95,7 +95,7 @@ class StatusBubbleViews::StatusView : public views::Label, } // The bubble can be in one of many stages: - typedef enum BubbleStage { + enum BubbleStage { BUBBLE_HIDDEN, // Entirely BUBBLE_HIDDEN. BUBBLE_HIDING_FADE, // In a fade-out transition. BUBBLE_HIDING_TIMER, // Waiting before a fade-out. @@ -104,7 +104,7 @@ class StatusBubbleViews::StatusView : public views::Label, BUBBLE_SHOWN // Fully visible. }; - typedef enum BubbleStyle { + enum BubbleStyle { STYLE_BOTTOM, STYLE_FLOATING, STYLE_STANDARD, @@ -691,4 +691,3 @@ void StatusBubbleViews::AvoidMouse() { size_.width(), size_.height())); } } - -- cgit v1.1