| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 MockRenderWidgetHostDelegate() {} | 142 MockRenderWidgetHostDelegate() {} |
| 143 ~MockRenderWidgetHostDelegate() override {} | 143 ~MockRenderWidgetHostDelegate() override {} |
| 144 const NativeWebKeyboardEvent* last_event() const { return last_event_.get(); } | 144 const NativeWebKeyboardEvent* last_event() const { return last_event_.get(); } |
| 145 protected: | 145 protected: |
| 146 // RenderWidgetHostDelegate: | 146 // RenderWidgetHostDelegate: |
| 147 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 147 bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 148 bool* is_keyboard_shortcut) override { | 148 bool* is_keyboard_shortcut) override { |
| 149 last_event_.reset(new NativeWebKeyboardEvent(event)); | 149 last_event_.reset(new NativeWebKeyboardEvent(event)); |
| 150 return true; | 150 return true; |
| 151 } | 151 } |
| 152 void Cut() override {} |
| 153 void Copy() override {} |
| 154 void Paste() override {} |
| 152 private: | 155 private: |
| 153 scoped_ptr<NativeWebKeyboardEvent> last_event_; | 156 scoped_ptr<NativeWebKeyboardEvent> last_event_; |
| 154 DISALLOW_COPY_AND_ASSIGN(MockRenderWidgetHostDelegate); | 157 DISALLOW_COPY_AND_ASSIGN(MockRenderWidgetHostDelegate); |
| 155 }; | 158 }; |
| 156 | 159 |
| 157 // Simple observer that keeps track of changes to a window for tests. | 160 // Simple observer that keeps track of changes to a window for tests. |
| 158 class TestWindowObserver : public aura::WindowObserver { | 161 class TestWindowObserver : public aura::WindowObserver { |
| 159 public: | 162 public: |
| 160 explicit TestWindowObserver(aura::Window* window_to_observe) | 163 explicit TestWindowObserver(aura::Window* window_to_observe) |
| 161 : window_(window_to_observe) { | 164 : window_(window_to_observe) { |
| (...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3569 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); | 3572 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); |
| 3570 view_->InitAsChild(NULL); | 3573 view_->InitAsChild(NULL); |
| 3571 view_->Show(); | 3574 view_->Show(); |
| 3572 view_->SetSize(size); | 3575 view_->SetSize(size); |
| 3573 view_->OnSwapCompositorFrame(0, | 3576 view_->OnSwapCompositorFrame(0, |
| 3574 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); | 3577 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); |
| 3575 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); | 3578 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); |
| 3576 } | 3579 } |
| 3577 | 3580 |
| 3578 } // namespace content | 3581 } // namespace content |
| OLD | NEW |