OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" | 11 #include "content/public/browser/native_web_keyboard_event.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
14 #include "ui/aura/aura_constants.h" | 14 #include "ui/aura/aura_constants.h" |
15 #include "ui/aura/desktop.h" | 15 #include "ui/aura/desktop.h" |
16 #include "ui/aura/event.h" | 16 #include "ui/aura/event.h" |
17 #include "ui/aura/hit_test.h" | 17 #include "ui/aura/hit_test.h" |
18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
19 #include "ui/aura/window_types.h" | 19 #include "ui/aura/window_types.h" |
| 20 #include "ui/base/ui_base_types.h" |
20 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
21 #include "ui/gfx/compositor/layer.h" | 22 #include "ui/gfx/compositor/layer.h" |
22 #include "ui/gfx/screen.h" | 23 #include "ui/gfx/screen.h" |
23 | 24 |
24 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 25 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
25 #include "base/bind.h" | 26 #include "base/bind.h" |
26 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 27 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
27 #include "content/browser/renderer_host/accelerated_surface_container_linux.h" | 28 #include "content/browser/renderer_host/accelerated_surface_container_linux.h" |
28 #include "content/common/gpu/gpu_messages.h" | 29 #include "content/common/gpu/gpu_messages.h" |
29 #include "ui/gfx/gl/gl_bindings.h" | 30 #include "ui/gfx/gl/gl_bindings.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 SetBounds(pos); | 112 SetBounds(pos); |
112 } | 113 } |
113 | 114 |
114 void RenderWidgetHostViewAura::InitAsFullscreen( | 115 void RenderWidgetHostViewAura::InitAsFullscreen( |
115 RenderWidgetHostView* reference_host_view) { | 116 RenderWidgetHostView* reference_host_view) { |
116 is_fullscreen_ = true; | 117 is_fullscreen_ = true; |
117 window_->SetType(aura::WINDOW_TYPE_POPUP); | 118 window_->SetType(aura::WINDOW_TYPE_POPUP); |
118 window_->Init(ui::Layer::LAYER_HAS_TEXTURE); | 119 window_->Init(ui::Layer::LAYER_HAS_TEXTURE); |
119 | 120 |
120 window_->SetParent(NULL); | 121 window_->SetParent(NULL); |
121 window_->Fullscreen(); | 122 window_->SetIntProperty(aura::kShowStateKey, ui::SHOW_STATE_FULLSCREEN); |
122 Show(); | 123 Show(); |
123 Focus(); | 124 Focus(); |
124 // TODO(derat): The window is visible but it's not being updated. Figure out | 125 // TODO(derat): The window is visible but it's not being updated. Figure out |
125 // why. | 126 // why. |
126 } | 127 } |
127 | 128 |
128 RenderWidgetHost* RenderWidgetHostViewAura::GetRenderWidgetHost() const { | 129 RenderWidgetHost* RenderWidgetHostViewAura::GetRenderWidgetHost() const { |
129 return host_; | 130 return host_; |
130 } | 131 } |
131 | 132 |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 } | 506 } |
506 #endif | 507 #endif |
507 | 508 |
508 //////////////////////////////////////////////////////////////////////////////// | 509 //////////////////////////////////////////////////////////////////////////////// |
509 // RenderWidgetHostViewAura, private: | 510 // RenderWidgetHostViewAura, private: |
510 | 511 |
511 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { | 512 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { |
512 //NOTIMPLEMENTED(); | 513 //NOTIMPLEMENTED(); |
513 // TODO(beng): See RenderWidgetHostViewWin. | 514 // TODO(beng): See RenderWidgetHostViewWin. |
514 } | 515 } |
OLD | NEW |