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

Side by Side Diff: chrome/browser/notifications/balloon_host.cc

Issue 5611001: Fix notifications being too large on OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/notifications/balloon.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/notifications/balloon_host.h" 5 #include "chrome/browser/notifications/balloon_host.h"
6 6
7 #include "chrome/browser/browser_list.h" 7 #include "chrome/browser/browser_list.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/notifications/balloon.h" 9 #include "chrome/browser/notifications/balloon.h"
10 #include "chrome/browser/notifications/notification.h" 10 #include "chrome/browser/notifications/notification.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void BalloonHost::Close(RenderViewHost* render_view_host) { 111 void BalloonHost::Close(RenderViewHost* render_view_host) {
112 balloon_->CloseByScript(); 112 balloon_->CloseByScript();
113 NotifyDisconnect(); 113 NotifyDisconnect();
114 } 114 }
115 115
116 void BalloonHost::RenderViewCreated(RenderViewHost* render_view_host) { 116 void BalloonHost::RenderViewCreated(RenderViewHost* render_view_host) {
117 render_view_host->Send(new ViewMsg_DisableScrollbarsForSmallWindows( 117 render_view_host->Send(new ViewMsg_DisableScrollbarsForSmallWindows(
118 render_view_host->routing_id(), balloon_->min_scrollbar_size())); 118 render_view_host->routing_id(), balloon_->min_scrollbar_size()));
119 render_view_host->WasResized(); 119 render_view_host->WasResized();
120 #if !defined(OS_MACOSX) 120 #if !defined(OS_MACOSX)
121 // TODO(levin): Make all of the code that went in originally with this change
122 // to be cross-platform. See http://crbug.com/64720
121 render_view_host->EnablePreferredSizeChangedMode( 123 render_view_host->EnablePreferredSizeChangedMode(
122 kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow); 124 kPreferredSizeWidth | kPreferredSizeHeightThisIsSlow);
123 #endif 125 #endif
124 } 126 }
125 127
126 void BalloonHost::RenderViewReady(RenderViewHost* render_view_host) { 128 void BalloonHost::RenderViewReady(RenderViewHost* render_view_host) {
127 should_notify_on_disconnect_ = true; 129 should_notify_on_disconnect_ = true;
128 NotificationService::current()->Notify( 130 NotificationService::current()->Notify(
129 NotificationType::NOTIFY_BALLOON_CONNECTED, 131 NotificationType::NOTIFY_BALLOON_CONNECTED,
130 Source<BalloonHost>(this), NotificationService::NoDetails()); 132 Source<BalloonHost>(this), NotificationService::NoDetails());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 263
262 void BalloonHost::NotifyDisconnect() { 264 void BalloonHost::NotifyDisconnect() {
263 if (!should_notify_on_disconnect_) 265 if (!should_notify_on_disconnect_)
264 return; 266 return;
265 267
266 should_notify_on_disconnect_ = false; 268 should_notify_on_disconnect_ = false;
267 NotificationService::current()->Notify( 269 NotificationService::current()->Notify(
268 NotificationType::NOTIFY_BALLOON_DISCONNECTED, 270 NotificationType::NOTIFY_BALLOON_DISCONNECTED,
269 Source<BalloonHost>(this), NotificationService::NoDetails()); 271 Source<BalloonHost>(this), NotificationService::NoDetails());
270 } 272 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/balloon.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698