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 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 widget->GetNativeView()->AddPreTargetHandler(GetFullscreenControlHost()); | 1998 widget->GetNativeView()->AddPreTargetHandler(GetFullscreenControlHost()); |
1999 } | 1999 } |
2000 } else if (fullscreen_control_host_) { | 2000 } else if (fullscreen_control_host_) { |
2001 auto* native_view = widget->GetNativeView(); | 2001 auto* native_view = widget->GetNativeView(); |
2002 if (native_view) | 2002 if (native_view) |
2003 native_view->RemovePreTargetHandler(fullscreen_control_host_.get()); | 2003 native_view->RemovePreTargetHandler(fullscreen_control_host_.get()); |
2004 } | 2004 } |
2005 #endif | 2005 #endif |
2006 } | 2006 } |
2007 | 2007 |
2008 void BrowserView::PaintChildren(const ui::PaintContext& context) { | 2008 void BrowserView::PaintChildren(const views::PaintInfo& paint_info) { |
2009 views::ClientView::PaintChildren(context); | 2009 views::ClientView::PaintChildren(paint_info); |
2010 // Don't reset the instance before it had a chance to get compositor callback. | 2010 // Don't reset the instance before it had a chance to get compositor callback. |
2011 if (!histogram_helper_) { | 2011 if (!histogram_helper_) { |
2012 histogram_helper_ = BrowserWindowHistogramHelper:: | 2012 histogram_helper_ = BrowserWindowHistogramHelper:: |
2013 MaybeRecordValueAndCreateInstanceOnBrowserPaint( | 2013 MaybeRecordValueAndCreateInstanceOnBrowserPaint( |
2014 GetWidget()->GetCompositor()); | 2014 GetWidget()->GetCompositor()); |
2015 } | 2015 } |
2016 } | 2016 } |
2017 | 2017 |
2018 void BrowserView::ChildPreferredSizeChanged(View* child) { | 2018 void BrowserView::ChildPreferredSizeChanged(View* child) { |
2019 Layout(); | 2019 Layout(); |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2707 } | 2707 } |
2708 | 2708 |
2709 extensions::ActiveTabPermissionGranter* | 2709 extensions::ActiveTabPermissionGranter* |
2710 BrowserView::GetActiveTabPermissionGranter() { | 2710 BrowserView::GetActiveTabPermissionGranter() { |
2711 content::WebContents* web_contents = GetActiveWebContents(); | 2711 content::WebContents* web_contents = GetActiveWebContents(); |
2712 if (!web_contents) | 2712 if (!web_contents) |
2713 return nullptr; | 2713 return nullptr; |
2714 return extensions::TabHelper::FromWebContents(web_contents) | 2714 return extensions::TabHelper::FromWebContents(web_contents) |
2715 ->active_tab_permission_granter(); | 2715 ->active_tab_permission_granter(); |
2716 } | 2716 } |
OLD | NEW |