| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 "chrome/renderer/mock_render_thread.h" | 5 #include "chrome/renderer/mock_render_thread.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/common/ipc_message_utils.h" | 8 #include "chrome/common/ipc_message_utils.h" |
| 9 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 bool handled = true; | 121 bool handled = true; |
| 122 bool msg_is_ok = true; | 122 bool msg_is_ok = true; |
| 123 IPC_BEGIN_MESSAGE_MAP_EX(MockRenderThread, msg, msg_is_ok) | 123 IPC_BEGIN_MESSAGE_MAP_EX(MockRenderThread, msg, msg_is_ok) |
| 124 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnMsgCreateWidget); | 124 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnMsgCreateWidget); |
| 125 IPC_MESSAGE_UNHANDLED(handled = false) | 125 IPC_MESSAGE_UNHANDLED(handled = false) |
| 126 IPC_END_MESSAGE_MAP_EX() | 126 IPC_END_MESSAGE_MAP_EX() |
| 127 } | 127 } |
| 128 | 128 |
| 129 // The Widget expects to be returned valid route_id. | 129 // The Widget expects to be returned valid route_id. |
| 130 void MockRenderThread::OnMsgCreateWidget(int opener_id, | 130 void MockRenderThread::OnMsgCreateWidget(int opener_id, |
| 131 bool focus_on_show, | 131 bool activatable, |
| 132 int* route_id) { | 132 int* route_id) { |
| 133 opener_id_ = opener_id; | 133 opener_id_ = opener_id; |
| 134 *route_id = routing_id_; | 134 *route_id = routing_id_; |
| 135 } | 135 } |
| 136 | 136 |
| OLD | NEW |