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/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/renderer_host/backing_store_skia.h" | 8 #include "content/browser/renderer_host/backing_store_skia.h" |
9 #include "content/browser/renderer_host/render_widget_host.h" | 9 #include "content/browser/renderer_host/render_widget_host.h" |
10 #include "content/browser/renderer_host/web_input_event_aura.h" | 10 #include "content/browser/renderer_host/web_input_event_aura.h" |
11 #include "content/public/browser/native_web_keyboard_event.h" | |
12 #include "content/common/gpu/gpu_messages.h" | 11 #include "content/common/gpu/gpu_messages.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
16 #include "ui/aura/client/aura_constants.h" | 15 #include "ui/aura/client/aura_constants.h" |
17 #include "ui/aura/client/tooltip_client.h" | 16 #include "ui/aura/client/tooltip_client.h" |
18 #include "ui/aura/client/window_types.h" | 17 #include "ui/aura/client/window_types.h" |
19 #include "ui/aura/event.h" | 18 #include "ui/aura/event.h" |
20 #include "ui/aura/gestures/gesture_recognizer.h" | 19 #include "ui/aura/gestures/gesture_recognizer.h" |
21 #include "ui/aura/root_window.h" | 20 #include "ui/aura/root_window.h" |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { | 909 void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { |
911 if (!window_->IsVisible()) | 910 if (!window_->IsVisible()) |
912 return; | 911 return; |
913 paint_canvas_ = canvas; | 912 paint_canvas_ = canvas; |
914 BackingStore* backing_store = host_->GetBackingStore(true); | 913 BackingStore* backing_store = host_->GetBackingStore(true); |
915 paint_canvas_ = NULL; | 914 paint_canvas_ = NULL; |
916 if (backing_store) { | 915 if (backing_store) { |
917 static_cast<BackingStoreSkia*>(backing_store)->SkiaShowRect(gfx::Point(), | 916 static_cast<BackingStoreSkia*>(backing_store)->SkiaShowRect(gfx::Point(), |
918 canvas); | 917 canvas); |
919 } else { | 918 } else { |
920 canvas->FillRect(SK_ColorWHITE, | 919 canvas->FillRect(gfx::Rect(gfx::Point(), window_->bounds().size()), |
921 gfx::Rect(gfx::Point(), window_->bounds().size())); | 920 SK_ColorWHITE); |
922 } | 921 } |
923 } | 922 } |
924 | 923 |
925 void RenderWidgetHostViewAura::OnWindowDestroying() { | 924 void RenderWidgetHostViewAura::OnWindowDestroying() { |
926 } | 925 } |
927 | 926 |
928 void RenderWidgetHostViewAura::OnWindowDestroyed() { | 927 void RenderWidgetHostViewAura::OnWindowDestroyed() { |
929 host_->ViewDestroyed(); | 928 host_->ViewDestroyed(); |
930 delete this; | 929 delete this; |
931 } | 930 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 // static | 1063 // static |
1065 void RenderWidgetHostView::GetDefaultScreenInfo( | 1064 void RenderWidgetHostView::GetDefaultScreenInfo( |
1066 WebKit::WebScreenInfo* results) { | 1065 WebKit::WebScreenInfo* results) { |
1067 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); | 1066 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); |
1068 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); | 1067 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); |
1069 results->availableRect = results->rect; | 1068 results->availableRect = results->rect; |
1070 // TODO(derat): Don't hardcode this? | 1069 // TODO(derat): Don't hardcode this? |
1071 results->depth = 24; | 1070 results->depth = 24; |
1072 results->depthPerComponent = 8; | 1071 results->depthPerComponent = 8; |
1073 } | 1072 } |
OLD | NEW |