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 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1986 widget->GetNativeView()->AddPreTargetHandler(GetFullscreenControlHost()); | 1986 widget->GetNativeView()->AddPreTargetHandler(GetFullscreenControlHost()); |
1987 } | 1987 } |
1988 } else if (fullscreen_control_host_) { | 1988 } else if (fullscreen_control_host_) { |
1989 auto* native_view = widget->GetNativeView(); | 1989 auto* native_view = widget->GetNativeView(); |
1990 if (native_view) | 1990 if (native_view) |
1991 native_view->RemovePreTargetHandler(fullscreen_control_host_.get()); | 1991 native_view->RemovePreTargetHandler(fullscreen_control_host_.get()); |
1992 } | 1992 } |
1993 #endif | 1993 #endif |
1994 } | 1994 } |
1995 | 1995 |
1996 void BrowserView::PaintChildren(const ui::PaintContext& context) { | 1996 void BrowserView::PaintChildren(const views::PaintInfo& paint_info) { |
1997 views::ClientView::PaintChildren(context); | 1997 views::ClientView::PaintChildren(paint_info); |
1998 // Don't reset the instance before it had a chance to get compositor callback. | 1998 // Don't reset the instance before it had a chance to get compositor callback. |
1999 if (!histogram_helper_) { | 1999 if (!histogram_helper_) { |
2000 histogram_helper_ = BrowserWindowHistogramHelper:: | 2000 histogram_helper_ = BrowserWindowHistogramHelper:: |
2001 MaybeRecordValueAndCreateInstanceOnBrowserPaint( | 2001 MaybeRecordValueAndCreateInstanceOnBrowserPaint( |
2002 GetWidget()->GetCompositor()); | 2002 GetWidget()->GetCompositor()); |
2003 } | 2003 } |
2004 } | 2004 } |
2005 | 2005 |
2006 void BrowserView::ChildPreferredSizeChanged(View* child) { | 2006 void BrowserView::ChildPreferredSizeChanged(View* child) { |
2007 Layout(); | 2007 Layout(); |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2695 } | 2695 } |
2696 | 2696 |
2697 extensions::ActiveTabPermissionGranter* | 2697 extensions::ActiveTabPermissionGranter* |
2698 BrowserView::GetActiveTabPermissionGranter() { | 2698 BrowserView::GetActiveTabPermissionGranter() { |
2699 content::WebContents* web_contents = GetActiveWebContents(); | 2699 content::WebContents* web_contents = GetActiveWebContents(); |
2700 if (!web_contents) | 2700 if (!web_contents) |
2701 return nullptr; | 2701 return nullptr; |
2702 return extensions::TabHelper::FromWebContents(web_contents) | 2702 return extensions::TabHelper::FromWebContents(web_contents) |
2703 ->active_tab_permission_granter(); | 2703 ->active_tab_permission_granter(); |
2704 } | 2704 } |
OLD | NEW |