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

Side by Side Diff: chrome/browser/gtk/notifications/balloon_view_gtk.cc

Issue 2915003: position the balloons after closing in a way that will keep the next one's cl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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/gtk/notifications/balloon_view_gtk.h" 5 #include "chrome/browser/gtk/notifications/balloon_view_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 DCHECK(balloon_); 153 DCHECK(balloon_);
154 154
155 // Create an amination from the current position to the desired one. 155 // Create an amination from the current position to the desired one.
156 int start_x; 156 int start_x;
157 int start_y; 157 int start_y;
158 int start_w; 158 int start_w;
159 int start_h; 159 int start_h;
160 gtk_window_get_position(GTK_WINDOW(frame_container_), &start_x, &start_y); 160 gtk_window_get_position(GTK_WINDOW(frame_container_), &start_x, &start_y);
161 gtk_window_get_size(GTK_WINDOW(frame_container_), &start_w, &start_h); 161 gtk_window_get_size(GTK_WINDOW(frame_container_), &start_w, &start_h);
162 162
163 int end_x = balloon_->position().x(); 163 int end_x = balloon_->GetPosition().x();
164 int end_y = balloon_->position().y(); 164 int end_y = balloon_->GetPosition().y();
165 int end_w = GetDesiredTotalWidth(); 165 int end_w = GetDesiredTotalWidth();
166 int end_h = GetDesiredTotalHeight(); 166 int end_h = GetDesiredTotalHeight();
167 167
168 anim_frame_start_ = gfx::Rect(start_x, start_y, start_w, start_h); 168 anim_frame_start_ = gfx::Rect(start_x, start_y, start_w, start_h);
169 anim_frame_end_ = gfx::Rect(end_x, end_y, end_w, end_h); 169 anim_frame_end_ = gfx::Rect(end_x, end_y, end_w, end_h);
170 animation_.reset(new SlideAnimation(this)); 170 animation_.reset(new SlideAnimation(this));
171 animation_->Show(); 171 animation_->Show();
172 } 172 }
173 173
174 void BalloonViewImpl::AnimationProgressed(const Animation* animation) { 174 void BalloonViewImpl::AnimationProgressed(const Animation* animation) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) { 408 void BalloonViewImpl::OnOptionsMenuButton(GtkWidget* widget) {
409 options_menu_->PopupAsContext(gtk_get_current_event_time()); 409 options_menu_->PopupAsContext(gtk_get_current_event_time());
410 } 410 }
411 411
412 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { 412 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) {
413 frame_container_ = NULL; 413 frame_container_ = NULL;
414 Close(false); 414 Close(false);
415 return FALSE; // Propagate. 415 return FALSE; // Propagate.
416 } 416 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/notifications/balloon_controller.mm ('k') | chrome/browser/notifications/balloon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698