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

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view.cc

Issue 9021046: Pass const gfx::Rect& as the first parameter to FillRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more fix Created 8 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/notifications/balloon_view.h" 5 #include "chrome/browser/ui/views/notifications/balloon_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 rect.set_height(GetShelfHeight()); 503 rect.set_height(GetShelfHeight());
504 GetFrameMask(rect, &path); 504 GetFrameMask(rect, &path);
505 505
506 SkPaint paint; 506 SkPaint paint;
507 paint.setAntiAlias(true); 507 paint.setAntiAlias(true);
508 paint.setColor(kControlBarBackgroundColor); 508 paint.setColor(kControlBarBackgroundColor);
509 canvas->GetSkCanvas()->drawPath(path, paint); 509 canvas->GetSkCanvas()->drawPath(path, paint);
510 510
511 // Draw a 1-pixel gray line between the content and the menu bar. 511 // Draw a 1-pixel gray line between the content and the menu bar.
512 int line_width = GetTotalWidth() - kLeftMargin - kRightMargin; 512 int line_width = GetTotalWidth() - kLeftMargin - kRightMargin;
513 canvas->FillRect(kControlBarSeparatorLineColor, 513 canvas->FillRect(gfx::Rect(kLeftMargin, 1 + GetShelfHeight(), line_width, 1),
514 gfx::Rect(kLeftMargin, 1 + GetShelfHeight(), line_width, 1)); 514 kControlBarSeparatorLineColor);
515
516 View::OnPaint(canvas); 515 View::OnPaint(canvas);
517 OnPaintBorder(canvas); 516 OnPaintBorder(canvas);
518 } 517 }
519 518
520 void BalloonViewImpl::OnBoundsChanged(const gfx::Rect& previous_bounds) { 519 void BalloonViewImpl::OnBoundsChanged(const gfx::Rect& previous_bounds) {
521 SizeContentsWindow(); 520 SizeContentsWindow();
522 } 521 }
523 522
524 void BalloonViewImpl::Observe(int type, 523 void BalloonViewImpl::Observe(int type,
525 const content::NotificationSource& source, 524 const content::NotificationSource& source,
526 const content::NotificationDetails& details) { 525 const content::NotificationDetails& details) {
527 if (type != chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED) { 526 if (type != chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED) {
528 NOTREACHED(); 527 NOTREACHED();
529 return; 528 return;
530 } 529 }
531 530
532 // If the renderer process attached to this balloon is disconnected 531 // If the renderer process attached to this balloon is disconnected
533 // (e.g., because of a crash), we want to close the balloon. 532 // (e.g., because of a crash), we want to close the balloon.
534 notification_registrar_.Remove( 533 notification_registrar_.Remove(
535 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 534 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
536 content::Source<Balloon>(balloon_)); 535 content::Source<Balloon>(balloon_));
537 Close(false); 536 Close(false);
538 } 537 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/suggested_text_view.cc ('k') | chrome/browser/ui/views/tabs/dragged_tab_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698