| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2761 // DelegatedFrameHost, public: | 2761 // DelegatedFrameHost, public: |
| 2762 | 2762 |
| 2763 ui::Layer* RenderWidgetHostViewAura::DelegatedFrameHostGetLayer() const { | 2763 ui::Layer* RenderWidgetHostViewAura::DelegatedFrameHostGetLayer() const { |
| 2764 return window_->layer(); | 2764 return window_->layer(); |
| 2765 } | 2765 } |
| 2766 | 2766 |
| 2767 bool RenderWidgetHostViewAura::DelegatedFrameHostIsVisible() const { | 2767 bool RenderWidgetHostViewAura::DelegatedFrameHostIsVisible() const { |
| 2768 return !host_->is_hidden(); | 2768 return !host_->is_hidden(); |
| 2769 } | 2769 } |
| 2770 | 2770 |
| 2771 SkColor RenderWidgetHostViewAura::DelegatedFrameHostGetGutterColor( |
| 2772 SkColor color) const { |
| 2773 // When making an element on the page fullscreen the element's background |
| 2774 // may not match the page's, so use black as the gutter color to avoid |
| 2775 // flashes of brighter colors during the transition. |
| 2776 if (host_->delegate() && host_->delegate()->IsFullscreenForCurrentTab(host_)) |
| 2777 return SK_ColorBLACK; |
| 2778 return color; |
| 2779 } |
| 2780 |
| 2771 gfx::Size RenderWidgetHostViewAura::DelegatedFrameHostDesiredSizeInDIP() const { | 2781 gfx::Size RenderWidgetHostViewAura::DelegatedFrameHostDesiredSizeInDIP() const { |
| 2772 return window_->bounds().size(); | 2782 return window_->bounds().size(); |
| 2773 } | 2783 } |
| 2774 | 2784 |
| 2775 bool RenderWidgetHostViewAura::DelegatedFrameCanCreateResizeLock() const { | 2785 bool RenderWidgetHostViewAura::DelegatedFrameCanCreateResizeLock() const { |
| 2776 #if !defined(OS_CHROMEOS) | 2786 #if !defined(OS_CHROMEOS) |
| 2777 // On Windows and Linux, holding pointer moves will not help throttling | 2787 // On Windows and Linux, holding pointer moves will not help throttling |
| 2778 // resizes. | 2788 // resizes. |
| 2779 // TODO(piman): on Windows we need to block (nested message loop?) the | 2789 // TODO(piman): on Windows we need to block (nested message loop?) the |
| 2780 // WM_SIZE event. On Linux we need to throttle at the WM level using | 2790 // WM_SIZE event. On Linux we need to throttle at the WM level using |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2855 | 2865 |
| 2856 //////////////////////////////////////////////////////////////////////////////// | 2866 //////////////////////////////////////////////////////////////////////////////// |
| 2857 // RenderWidgetHostViewBase, public: | 2867 // RenderWidgetHostViewBase, public: |
| 2858 | 2868 |
| 2859 // static | 2869 // static |
| 2860 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2870 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2861 GetScreenInfoForWindow(results, NULL); | 2871 GetScreenInfoForWindow(results, NULL); |
| 2862 } | 2872 } |
| 2863 | 2873 |
| 2864 } // namespace content | 2874 } // namespace content |
| OLD | NEW |