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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 else | 1006 else |
1007 return bounds; | 1007 return bounds; |
1008 } | 1008 } |
1009 | 1009 |
1010 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { | 1010 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { |
1011 RenderWidgetHostViewBase::SetBackground(background); | 1011 RenderWidgetHostViewBase::SetBackground(background); |
1012 host_->SetBackground(background); | 1012 host_->SetBackground(background); |
1013 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); | 1013 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); |
1014 } | 1014 } |
1015 | 1015 |
1016 #if defined(OS_WIN) | |
1017 gfx::NativeViewAccessible | |
1018 RenderWidgetHostViewAura::AccessibleObjectFromChildId(long child_id) { | |
1019 BrowserAccessibilityManager* manager = GetBrowserAccessibilityManager(); | |
1020 if (!manager) | |
1021 return NULL; | |
1022 | |
1023 return manager->ToBrowserAccessibilityManagerWin()->GetFromUniqueIdWin( | |
1024 child_id); | |
1025 } | |
1026 #endif // defined(OS_WIN) | |
1027 | |
1028 void RenderWidgetHostViewAura::UpdateCursor(const WebCursor& cursor) { | 1016 void RenderWidgetHostViewAura::UpdateCursor(const WebCursor& cursor) { |
1029 current_cursor_ = cursor; | 1017 current_cursor_ = cursor; |
1030 const gfx::Display display = gfx::Screen::GetScreenFor(window_)-> | 1018 const gfx::Display display = gfx::Screen::GetScreenFor(window_)-> |
1031 GetDisplayNearestWindow(window_); | 1019 GetDisplayNearestWindow(window_); |
1032 current_cursor_.SetDisplayInfo(display); | 1020 current_cursor_.SetDisplayInfo(display); |
1033 UpdateCursorIfOverSelf(); | 1021 UpdateCursorIfOverSelf(); |
1034 } | 1022 } |
1035 | 1023 |
1036 void RenderWidgetHostViewAura::SetIsLoading(bool is_loading) { | 1024 void RenderWidgetHostViewAura::SetIsLoading(bool is_loading) { |
1037 if (is_loading_ && !is_loading && paint_observer_) | 1025 if (is_loading_ && !is_loading && paint_observer_) |
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3281 RenderWidgetHost* widget) { | 3269 RenderWidgetHost* widget) { |
3282 return new RenderWidgetHostViewAura(widget); | 3270 return new RenderWidgetHostViewAura(widget); |
3283 } | 3271 } |
3284 | 3272 |
3285 // static | 3273 // static |
3286 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3274 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
3287 GetScreenInfoForWindow(results, NULL); | 3275 GetScreenInfoForWindow(results, NULL); |
3288 } | 3276 } |
3289 | 3277 |
3290 } // namespace content | 3278 } // namespace content |
OLD | NEW |