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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 // static | 477 // static |
478 void BrowserView::Paint1pxHorizontalLine(gfx::Canvas* canvas, | 478 void BrowserView::Paint1pxHorizontalLine(gfx::Canvas* canvas, |
479 SkColor color, | 479 SkColor color, |
480 const gfx::Rect& bounds, | 480 const gfx::Rect& bounds, |
481 bool at_bottom) { | 481 bool at_bottom) { |
482 gfx::ScopedCanvas scoped_canvas(canvas); | 482 gfx::ScopedCanvas scoped_canvas(canvas); |
483 const float scale = canvas->UndoDeviceScaleFactor(); | 483 const float scale = canvas->UndoDeviceScaleFactor(); |
484 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); | 484 gfx::RectF rect(gfx::ScaleRect(gfx::RectF(bounds), scale)); |
485 const float inset = rect.height() - 1; | 485 const float inset = rect.height() - 1; |
486 rect.Inset(0, at_bottom ? inset : 0, 0, at_bottom ? 0 : inset); | 486 rect.Inset(0, at_bottom ? inset : 0, 0, at_bottom ? 0 : inset); |
487 SkPaint paint; | 487 cc::PaintFlags paint; |
488 paint.setColor(color); | 488 paint.setColor(color); |
489 canvas->sk_canvas()->drawRect(gfx::RectFToSkRect(rect), paint); | 489 canvas->sk_canvas()->drawRect(gfx::RectFToSkRect(rect), paint); |
490 } | 490 } |
491 | 491 |
492 void BrowserView::InitStatusBubble() { | 492 void BrowserView::InitStatusBubble() { |
493 status_bubble_.reset( | 493 status_bubble_.reset( |
494 new StatusBubbleViews(contents_web_view_, HasClientEdge())); | 494 new StatusBubbleViews(contents_web_view_, HasClientEdge())); |
495 contents_web_view_->SetStatusBubble(status_bubble_.get()); | 495 contents_web_view_->SetStatusBubble(status_bubble_.get()); |
496 } | 496 } |
497 | 497 |
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |