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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Clean up comments, fix mac build Created 3 years, 11 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // static 476 // static
477 void BrowserView::Paint1pxHorizontalLine(gfx::Canvas* canvas, 477 void BrowserView::Paint1pxHorizontalLine(gfx::Canvas* canvas,
478 SkColor color, 478 SkColor color,
479 const gfx::Rect& bounds, 479 const gfx::Rect& bounds,
480 bool at_bottom) { 480 bool at_bottom) {
481 gfx::ScopedCanvas scoped_canvas(canvas); 481 gfx::ScopedCanvas scoped_canvas(canvas);
482 const float scale = canvas->UndoDeviceScaleFactor(); 482 const float scale = canvas->UndoDeviceScaleFactor();
483 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); 483 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale));
484 const float inset = rect.height() - 1; 484 const float inset = rect.height() - 1;
485 rect.Inset(0, at_bottom ? inset : 0, 0, at_bottom ? 0 : inset); 485 rect.Inset(0, at_bottom ? inset : 0, 0, at_bottom ? 0 : inset);
486 SkPaint paint; 486 cc::PaintFlags paint;
487 paint.setColor(color); 487 paint.setColor(color);
488 canvas->sk_canvas()->drawRect(gfx::RectFToSkRect(rect), paint); 488 canvas->sk_canvas()->drawRect(gfx::RectFToSkRect(rect), paint);
489 } 489 }
490 490
491 void BrowserView::InitStatusBubble() { 491 void BrowserView::InitStatusBubble() {
492 status_bubble_.reset( 492 status_bubble_.reset(
493 new StatusBubbleViews(contents_web_view_, HasClientEdge())); 493 new StatusBubbleViews(contents_web_view_, HasClientEdge()));
494 contents_web_view_->SetStatusBubble(status_bubble_.get()); 494 contents_web_view_->SetStatusBubble(status_bubble_.get());
495 } 495 }
496 496
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 } 2644 }
2645 2645
2646 extensions::ActiveTabPermissionGranter* 2646 extensions::ActiveTabPermissionGranter*
2647 BrowserView::GetActiveTabPermissionGranter() { 2647 BrowserView::GetActiveTabPermissionGranter() {
2648 content::WebContents* web_contents = GetActiveWebContents(); 2648 content::WebContents* web_contents = GetActiveWebContents();
2649 if (!web_contents) 2649 if (!web_contents)
2650 return nullptr; 2650 return nullptr;
2651 return extensions::TabHelper::FromWebContents(web_contents) 2651 return extensions::TabHelper::FromWebContents(web_contents)
2652 ->active_tab_permission_granter(); 2652 ->active_tab_permission_granter();
2653 } 2653 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698