OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ | 5 #ifndef WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ |
6 #define WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ | 6 #define WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // IPC::Listener implementation: | 59 // IPC::Listener implementation: |
60 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 60 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
61 virtual void OnChannelError() OVERRIDE = 0; | 61 virtual void OnChannelError() OVERRIDE = 0; |
62 | 62 |
63 // Called over IPC by the viewer process to tell this host that it should be | 63 // Called over IPC by the viewer process to tell this host that it should be |
64 // drawing to |target_surface|. | 64 // drawing to |target_surface|. |
65 virtual void OnSetTargetSurface(gfx::NativeViewId target_surface) = 0; | 65 virtual void OnSetTargetSurface(gfx::NativeViewId target_surface) = 0; |
66 | 66 |
67 // Called over IPC by the viewer process to request that the url passed in be | 67 // Called over IPC by the viewer process to request that the url passed in be |
68 // opened. | 68 // opened. |
69 virtual void OnOpenURL(const string16& url) = 0; | 69 virtual void OnOpenURL(const base::string16& url) = 0; |
70 | 70 |
71 // Called over IPC by the viewer process to request that the search string | 71 // Called over IPC by the viewer process to request that the search string |
72 // passed in is passed to the default search provider and a URL navigation be | 72 // passed in is passed to the default search provider and a URL navigation be |
73 // performed. | 73 // performed. |
74 virtual void OnHandleSearchRequest(const string16& search_string) = 0; | 74 virtual void OnHandleSearchRequest(const base::string16& search_string) = 0; |
75 | 75 |
76 // Called over IPC by the viewer process when the window size has changed. | 76 // Called over IPC by the viewer process when the window size has changed. |
77 virtual void OnWindowSizeChanged(uint32 width, uint32 height) = 0; | 77 virtual void OnWindowSizeChanged(uint32 width, uint32 height) = 0; |
78 | 78 |
79 void NotifyChannelConnected(); | 79 void NotifyChannelConnected(); |
80 | 80 |
81 // Inner message filter used to handle connection event on the IPC channel | 81 // Inner message filter used to handle connection event on the IPC channel |
82 // proxy's background thread. This prevents consumers of | 82 // proxy's background thread. This prevents consumers of |
83 // MetroViewerProcessHost from having to pump messages on their own message | 83 // MetroViewerProcessHost from having to pump messages on their own message |
84 // loop. | 84 // loop. |
(...skipping 11 matching lines...) Expand all Loading... |
96 | 96 |
97 scoped_ptr<IPC::ChannelProxy> channel_; | 97 scoped_ptr<IPC::ChannelProxy> channel_; |
98 scoped_ptr<base::WaitableEvent> channel_connected_event_; | 98 scoped_ptr<base::WaitableEvent> channel_connected_event_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); | 100 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace win8 | 103 } // namespace win8 |
104 | 104 |
105 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ | 105 #endif // WIN8_VIEWER_METRO_VIEWER_PROCESS_HOST_H_ |
OLD | NEW |