| 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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 HandleParentBoundsChanged(); | 802 HandleParentBoundsChanged(); |
| 803 } | 803 } |
| 804 | 804 |
| 805 void RenderWidgetHostViewAura::Focus() { | 805 void RenderWidgetHostViewAura::Focus() { |
| 806 // Make sure we have a FocusClient before attempting to Focus(). In some | 806 // Make sure we have a FocusClient before attempting to Focus(). In some |
| 807 // situations we may not yet be in a valid Window hierarchy (such as reloading | 807 // situations we may not yet be in a valid Window hierarchy (such as reloading |
| 808 // after out of memory discarded the tab). | 808 // after out of memory discarded the tab). |
| 809 aura::client::FocusClient* client = aura::client::GetFocusClient(window_); | 809 aura::client::FocusClient* client = aura::client::GetFocusClient(window_); |
| 810 if (client) | 810 if (client) |
| 811 window_->Focus(); | 811 window_->Focus(); |
| 812 |
| 813 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 814 switches::kTransparentBackgroundRWHV)) { |
| 815 SetBackgroundColor(SK_ColorTRANSPARENT); |
| 816 } |
| 812 } | 817 } |
| 813 | 818 |
| 814 bool RenderWidgetHostViewAura::HasFocus() const { | 819 bool RenderWidgetHostViewAura::HasFocus() const { |
| 815 return window_->HasFocus(); | 820 return window_->HasFocus(); |
| 816 } | 821 } |
| 817 | 822 |
| 818 bool RenderWidgetHostViewAura::IsSurfaceAvailableForCopy() const { | 823 bool RenderWidgetHostViewAura::IsSurfaceAvailableForCopy() const { |
| 819 return delegated_frame_host_->CanCopyToBitmap(); | 824 return delegated_frame_host_->CanCopyToBitmap(); |
| 820 } | 825 } |
| 821 | 826 |
| (...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2941 | 2946 |
| 2942 //////////////////////////////////////////////////////////////////////////////// | 2947 //////////////////////////////////////////////////////////////////////////////// |
| 2943 // RenderWidgetHostViewBase, public: | 2948 // RenderWidgetHostViewBase, public: |
| 2944 | 2949 |
| 2945 // static | 2950 // static |
| 2946 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2951 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2947 GetScreenInfoForWindow(results, NULL); | 2952 GetScreenInfoForWindow(results, NULL); |
| 2948 } | 2953 } |
| 2949 | 2954 |
| 2950 } // namespace content | 2955 } // namespace content |
| OLD | NEW |