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/web_input_event_aura.h" | 9 #include "content/browser/renderer_host/web_input_event_aura.h" |
10 #include "content/browser/renderer_host/render_widget_host.h" | 10 #include "content/browser/renderer_host/render_widget_host.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 "ui/aura/aura_constants.h" | |
oshima
2011/10/28 08:52:56
i saw ben's comment that this should be aura_shell
varunjain
2011/10/28 17:15:34
yes. content is not allowed to depend on shell.. s
| |
13 #include "ui/aura/desktop.h" | 14 #include "ui/aura/desktop.h" |
14 #include "ui/aura/event.h" | 15 #include "ui/aura/event.h" |
15 #include "ui/aura/hit_test.h" | 16 #include "ui/aura/hit_test.h" |
16 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
17 #include "ui/gfx/canvas.h" | 18 #include "ui/gfx/canvas.h" |
18 #include "ui/gfx/compositor/layer.h" | 19 #include "ui/gfx/compositor/layer.h" |
19 | 20 |
20 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 21 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
21 #include "base/bind.h" | 22 #include "base/bind.h" |
22 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 23 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 int error_code) { | 174 int error_code) { |
174 UpdateCursorIfOverSelf(); | 175 UpdateCursorIfOverSelf(); |
175 Destroy(); | 176 Destroy(); |
176 } | 177 } |
177 | 178 |
178 void RenderWidgetHostViewAura::Destroy() { | 179 void RenderWidgetHostViewAura::Destroy() { |
179 delete window_; | 180 delete window_; |
180 } | 181 } |
181 | 182 |
182 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { | 183 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { |
183 //NOTIMPLEMENTED(); | 184 string16* tooltip = new string16(tooltip_text); |
185 window_->SetProperty(aura::kTooltipTextKey, tooltip); | |
oshima
2011/10/28 08:52:56
this will leak memory. you need to delete old prop
varunjain
2011/10/28 17:15:34
I will fix this.
| |
184 } | 186 } |
185 | 187 |
186 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( | 188 BackingStore* RenderWidgetHostViewAura::AllocBackingStore( |
187 const gfx::Size& size) { | 189 const gfx::Size& size) { |
188 return new BackingStoreSkia(host_, size); | 190 return new BackingStoreSkia(host_, size); |
189 } | 191 } |
190 | 192 |
191 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 193 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
192 void RenderWidgetHostViewAura::AcceleratedSurfaceNew( | 194 void RenderWidgetHostViewAura::AcceleratedSurfaceNew( |
193 int32 width, | 195 int32 width, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
418 } | 420 } |
419 #endif | 421 #endif |
420 | 422 |
421 //////////////////////////////////////////////////////////////////////////////// | 423 //////////////////////////////////////////////////////////////////////////////// |
422 // RenderWidgetHostViewAura, private: | 424 // RenderWidgetHostViewAura, private: |
423 | 425 |
424 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { | 426 void RenderWidgetHostViewAura::UpdateCursorIfOverSelf() { |
425 //NOTIMPLEMENTED(); | 427 //NOTIMPLEMENTED(); |
426 // TODO(beng): See RenderWidgetHostViewWin. | 428 // TODO(beng): See RenderWidgetHostViewWin. |
427 } | 429 } |
OLD | NEW |