Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: content/public/test/mock_render_thread.h

Issue 226503002: Move modal dialogs from WebViewClient to WebFrameClient, part 1/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last nits Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/public/test/mock_render_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 15 matching lines...) Expand all
26 // ViewHostMsg_CreateWindow : sync message sent by the Widget. 26 // ViewHostMsg_CreateWindow : sync message sent by the Widget.
27 // ViewMsg_Close : async, send to the Widget. 27 // ViewMsg_Close : async, send to the Widget.
28 class MockRenderThread : public RenderThread { 28 class MockRenderThread : public RenderThread {
29 public: 29 public:
30 MockRenderThread(); 30 MockRenderThread();
31 virtual ~MockRenderThread(); 31 virtual ~MockRenderThread();
32 32
33 // Provides access to the messages that have been received by this thread. 33 // Provides access to the messages that have been received by this thread.
34 IPC::TestSink& sink() { return sink_; } 34 IPC::TestSink& sink() { return sink_; }
35 35
36 // Helpers for embedders to know when content IPC messages are received, since
37 // they don't have access to content IPC files.
38 void VerifyRunJavaScriptMessageSend(
39 const base::string16& expected_alert_message);
40
41 // RenderThread implementation: 36 // RenderThread implementation:
42 virtual bool Send(IPC::Message* msg) OVERRIDE; 37 virtual bool Send(IPC::Message* msg) OVERRIDE;
43 virtual base::MessageLoop* GetMessageLoop() OVERRIDE; 38 virtual base::MessageLoop* GetMessageLoop() OVERRIDE;
44 virtual IPC::SyncChannel* GetChannel() OVERRIDE; 39 virtual IPC::SyncChannel* GetChannel() OVERRIDE;
45 virtual std::string GetLocale() OVERRIDE; 40 virtual std::string GetLocale() OVERRIDE;
46 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() OVERRIDE; 41 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() OVERRIDE;
47 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() 42 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy()
48 OVERRIDE; 43 OVERRIDE;
49 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; 44 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE;
50 virtual void RemoveRoute(int32 routing_id) OVERRIDE; 45 virtual void RemoveRoute(int32 routing_id) OVERRIDE;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // A list of message filters added to this thread. 158 // A list of message filters added to this thread.
164 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; 159 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_;
165 160
166 // Observers to notify. 161 // Observers to notify.
167 ObserverList<RenderProcessObserver> observers_; 162 ObserverList<RenderProcessObserver> observers_;
168 }; 163 };
169 164
170 } // namespace content 165 } // namespace content
171 166
172 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ 167 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « content/public/renderer/render_view.h ('k') | content/public/test/mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698