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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 {} | 152 void Cut() override {} |
153 void Copy() override {} | 153 void Copy() override {} |
154 void Paste() override {} | 154 void Paste() override {} |
| 155 void SelectAll() override {} |
| 156 |
155 private: | 157 private: |
156 scoped_ptr<NativeWebKeyboardEvent> last_event_; | 158 scoped_ptr<NativeWebKeyboardEvent> last_event_; |
157 DISALLOW_COPY_AND_ASSIGN(MockRenderWidgetHostDelegate); | 159 DISALLOW_COPY_AND_ASSIGN(MockRenderWidgetHostDelegate); |
158 }; | 160 }; |
159 | 161 |
160 // Simple observer that keeps track of changes to a window for tests. | 162 // Simple observer that keeps track of changes to a window for tests. |
161 class TestWindowObserver : public aura::WindowObserver { | 163 class TestWindowObserver : public aura::WindowObserver { |
162 public: | 164 public: |
163 explicit TestWindowObserver(aura::Window* window_to_observe) | 165 explicit TestWindowObserver(aura::Window* window_to_observe) |
164 : window_(window_to_observe) { | 166 : window_(window_to_observe) { |
(...skipping 3470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3635 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); | 3637 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); |
3636 view_->InitAsChild(NULL); | 3638 view_->InitAsChild(NULL); |
3637 view_->Show(); | 3639 view_->Show(); |
3638 view_->SetSize(size); | 3640 view_->SetSize(size); |
3639 view_->OnSwapCompositorFrame(0, | 3641 view_->OnSwapCompositorFrame(0, |
3640 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); | 3642 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); |
3641 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); | 3643 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); |
3642 } | 3644 } |
3643 | 3645 |
3644 } // namespace content | 3646 } // namespace content |
OLD | NEW |