| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 CdlPaint 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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2596 } | 2596 } |
| 2597 | 2597 |
| 2598 extensions::ActiveTabPermissionGranter* | 2598 extensions::ActiveTabPermissionGranter* |
| 2599 BrowserView::GetActiveTabPermissionGranter() { | 2599 BrowserView::GetActiveTabPermissionGranter() { |
| 2600 content::WebContents* web_contents = GetActiveWebContents(); | 2600 content::WebContents* web_contents = GetActiveWebContents(); |
| 2601 if (!web_contents) | 2601 if (!web_contents) |
| 2602 return nullptr; | 2602 return nullptr; |
| 2603 return extensions::TabHelper::FromWebContents(web_contents) | 2603 return extensions::TabHelper::FromWebContents(web_contents) |
| 2604 ->active_tab_permission_granter(); | 2604 ->active_tab_permission_granter(); |
| 2605 } | 2605 } |
| OLD | NEW |