| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |