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

Unified Diff: chrome/browser/notifications/balloon_host.cc

Issue 9702068: Move extension pop-ups and notifications to the new auto-resize code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small update 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/balloon_host.cc
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index bc79b3c43620ddfcb759f4ef2d849a147c2b9461..05d7301cfbf66ea73dbc2424069192841efa09ff 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_host.h"
+
+#include "chrome/browser/notifications/balloon.h"
+#include "chrome/browser/notifications/balloon_collection_impl.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_preferences_util.h"
@@ -68,9 +70,9 @@ void BalloonHost::HandleMouseDown() {
balloon_->OnClick();
}
-void BalloonHost::UpdatePreferredSize(WebContents* source,
- const gfx::Size& pref_size) {
- balloon_->SetContentPreferredSize(pref_size);
+void BalloonHost::ResizeDueToAutoResize(WebContents* source,
+ const gfx::Size& pref_size) {
+ balloon_->ResizeDueToAutoResize(pref_size);
}
void BalloonHost::AddNewContents(WebContents* source,
@@ -86,10 +88,11 @@ void BalloonHost::AddNewContents(WebContents* source,
}
void BalloonHost::RenderViewCreated(content::RenderViewHost* render_view_host) {
- render_view_host->DisableScrollbarsForThreshold(
- balloon_->min_scrollbar_size());
- render_view_host->WasResized();
- render_view_host->EnablePreferredSizeMode();
+ gfx::Size min_size(BalloonCollectionImpl::min_balloon_width(),
+ BalloonCollectionImpl::min_balloon_height());
+ gfx::Size max_size(BalloonCollectionImpl::max_balloon_width(),
+ BalloonCollectionImpl::max_balloon_height());
+ render_view_host->EnableAutoResize(min_size, max_size);
if (enable_web_ui_)
render_view_host->AllowBindings(content::BINDINGS_POLICY_WEB_UI);

Powered by Google App Engine
This is Rietveld 408576698