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

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

Issue 2085673004: Fix tab strip rendering at non-integral scale factors in MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 } 533 }
534 534
535 // static 535 // static
536 void BrowserView::Paint1pxHorizontalLine(gfx::Canvas* canvas, 536 void BrowserView::Paint1pxHorizontalLine(gfx::Canvas* canvas,
537 SkColor color, 537 SkColor color,
538 const gfx::Rect& bounds, 538 const gfx::Rect& bounds,
539 bool at_bottom) { 539 bool at_bottom) {
540 gfx::ScopedCanvas scoped_canvas(canvas); 540 gfx::ScopedCanvas scoped_canvas(canvas);
541 const float scale = canvas->UndoDeviceScaleFactor(); 541 const float scale = canvas->UndoDeviceScaleFactor();
542 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); 542 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale));
543 const int inset = rect.height() - 1; 543 const float inset = rect.height() - 1;
544 rect.Inset(0, at_bottom ? inset : 0, 0, at_bottom ? 0 : inset); 544 rect.Inset(0, at_bottom ? inset : 0, 0, at_bottom ? 0 : inset);
545 SkPaint paint; 545 SkPaint paint;
546 paint.setColor(color); 546 paint.setColor(color);
547 canvas->sk_canvas()->drawRect(gfx::RectFToSkRect(rect), paint); 547 canvas->sk_canvas()->drawRect(gfx::RectFToSkRect(rect), paint);
548 } 548 }
549 549
550 void BrowserView::InitStatusBubble() { 550 void BrowserView::InitStatusBubble() {
551 status_bubble_.reset(new StatusBubbleViews(contents_web_view_)); 551 status_bubble_.reset(new StatusBubbleViews(contents_web_view_));
552 contents_web_view_->SetStatusBubble(status_bubble_.get()); 552 contents_web_view_->SetStatusBubble(status_bubble_.get());
553 } 553 }
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 } 2652 }
2653 2653
2654 extensions::ActiveTabPermissionGranter* 2654 extensions::ActiveTabPermissionGranter*
2655 BrowserView::GetActiveTabPermissionGranter() { 2655 BrowserView::GetActiveTabPermissionGranter() {
2656 content::WebContents* web_contents = GetActiveWebContents(); 2656 content::WebContents* web_contents = GetActiveWebContents();
2657 if (!web_contents) 2657 if (!web_contents)
2658 return nullptr; 2658 return nullptr;
2659 return extensions::TabHelper::FromWebContents(web_contents) 2659 return extensions::TabHelper::FromWebContents(web_contents)
2660 ->active_tab_permission_granter(); 2660 ->active_tab_permission_granter();
2661 } 2661 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698