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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 } | 584 } |
585 | 585 |
586 void ReleaseTouchPoint(int index) { | 586 void ReleaseTouchPoint(int index) { |
587 touch_event_.ReleasePoint(index); | 587 touch_event_.ReleasePoint(index); |
588 } | 588 } |
589 | 589 |
590 const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) { | 590 const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) { |
591 PickleIterator iter(message); | 591 PickleIterator iter(message); |
592 const char* data; | 592 const char* data; |
593 int data_length; | 593 int data_length; |
594 if (!message.ReadData(&iter, &data, &data_length)) | 594 if (!iter.ReadData(&data, &data_length)) |
595 return NULL; | 595 return NULL; |
596 return reinterpret_cast<const WebInputEvent*>(data); | 596 return reinterpret_cast<const WebInputEvent*>(data); |
597 } | 597 } |
598 | 598 |
599 base::MessageLoopForUI message_loop_; | 599 base::MessageLoopForUI message_loop_; |
600 | 600 |
601 scoped_ptr<TestBrowserContext> browser_context_; | 601 scoped_ptr<TestBrowserContext> browser_context_; |
602 RenderWidgetHostProcess* process_; // Deleted automatically by the widget. | 602 RenderWidgetHostProcess* process_; // Deleted automatically by the widget. |
603 scoped_ptr<MockRenderWidgetHostDelegate> delegate_; | 603 scoped_ptr<MockRenderWidgetHostDelegate> delegate_; |
604 scoped_ptr<MockRenderWidgetHost> host_; | 604 scoped_ptr<MockRenderWidgetHost> host_; |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 // Having an initial size set means that the size information had been sent | 1464 // Having an initial size set means that the size information had been sent |
1465 // with the reqiest to new up the RenderView and so subsequent WasResized | 1465 // with the reqiest to new up the RenderView and so subsequent WasResized |
1466 // calls should not result in new IPC (unless the size has actually changed). | 1466 // calls should not result in new IPC (unless the size has actually changed). |
1467 host_->WasResized(); | 1467 host_->WasResized(); |
1468 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); | 1468 EXPECT_FALSE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID)); |
1469 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size); | 1469 EXPECT_EQ(initial_size_, host_->old_resize_params_->new_size); |
1470 EXPECT_TRUE(host_->resize_ack_pending_); | 1470 EXPECT_TRUE(host_->resize_ack_pending_); |
1471 } | 1471 } |
1472 | 1472 |
1473 } // namespace content | 1473 } // namespace content |
OLD | NEW |