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

Side by Side Diff: chrome_frame/chrome_frame_delegate.h

Issue 5998006: Clean up Automation and Chrome Frame IPC code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « chrome_frame/chrome_frame_automation.cc ('k') | chrome_frame/chrome_frame_delegate.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_FRAME_CHROME_FRAME_DELEGATE_H_ 5 #ifndef CHROME_FRAME_CHROME_FRAME_DELEGATE_H_
6 #define CHROME_FRAME_CHROME_FRAME_DELEGATE_H_ 6 #define CHROME_FRAME_CHROME_FRAME_DELEGATE_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlwin.h> 9 #include <atlwin.h>
10 #include <queue> 10 #include <queue>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const FilePath& path, 72 const FilePath& path,
73 void* user_data, 73 void* user_data,
74 AutomationMsg_ExtensionResponseValues response) {} 74 AutomationMsg_ExtensionResponseValues response) {}
75 virtual void OnGetEnabledExtensionsComplete( 75 virtual void OnGetEnabledExtensionsComplete(
76 void* user_data, 76 void* user_data,
77 const std::vector<FilePath>& extension_directories) {} 77 const std::vector<FilePath>& extension_directories) {}
78 virtual void OnLoadFailed(int error_code, const std::string& url) {} 78 virtual void OnLoadFailed(int error_code, const std::string& url) {}
79 virtual void OnMessageReceived(const IPC::Message& msg); 79 virtual void OnMessageReceived(const IPC::Message& msg);
80 virtual void OnChannelError() {} 80 virtual void OnChannelError() {}
81 81
82 static bool IsTabMessage(const IPC::Message& message, int* tab_handle); 82 static bool IsTabMessage(const IPC::Message& message);
83 83
84 virtual bool IsValid() const { 84 virtual bool IsValid() const {
85 return true; 85 return true;
86 } 86 }
87 87
88 virtual void OnHostMoved() {} 88 virtual void OnHostMoved() {}
89 89
90 protected: 90 protected:
91 // Protected methods to be overriden. 91 // Protected methods to be overriden.
92 virtual void OnNavigationStateChanged(int tab_handle, int flags, 92 virtual void OnNavigationStateChanged(
93 const IPC::NavigationInfo& nav_info) {} 93 int flags, const NavigationInfo& nav_info) {}
94 virtual void OnUpdateTargetUrl(int tab_handle, 94 virtual void OnUpdateTargetUrl(const std::wstring& new_target_url) {}
95 const std::wstring& new_target_url) {} 95 virtual void OnAcceleratorPressed(const MSG& accel_message) {}
96 virtual void OnAcceleratorPressed(int tab_handle, const MSG& accel_message) {} 96 virtual void OnTabbedOut(bool reverse) {}
97 virtual void OnTabbedOut(int tab_handle, bool reverse) {} 97 virtual void OnOpenURL(
98 virtual void OnOpenURL(int tab_handle, const GURL& url, 98 const GURL& url, const GURL& referrer, int open_disposition) {}
99 const GURL& referrer, int open_disposition) {} 99 virtual void OnDidNavigate(const NavigationInfo& navigation_info) {}
100 virtual void OnDidNavigate(int tab_handle, 100 virtual void OnNavigationFailed(int error_code, const GURL& gurl) {}
101 const IPC::NavigationInfo& navigation_info) {} 101 virtual void OnLoad(const GURL& url) {}
102 virtual void OnNavigationFailed(int tab_handle, int error_code, 102 virtual void OnMessageFromChromeFrame(const std::string& message,
103 const GURL& gurl) {}
104 virtual void OnLoad(int tab_handle, const GURL& url) {}
105 virtual void OnMessageFromChromeFrame(int tab_handle,
106 const std::string& message,
107 const std::string& origin, 103 const std::string& origin,
108 const std::string& target) {} 104 const std::string& target) {}
109 virtual void OnHandleContextMenu(int tab_handle, HANDLE menu_handle, 105 virtual void OnHandleContextMenu(HANDLE menu_handle, int align_flags,
110 int align_flags, 106 const MiniContextMenuParams& params) {}
111 const IPC::MiniContextMenuParams& params) {} 107 virtual void OnRequestStart(
112 virtual void OnRequestStart(int tab_handle, int request_id, 108 int request_id, const AutomationURLRequest& request) {}
113 const IPC::AutomationURLRequest& request) {} 109 virtual void OnRequestRead(int request_id, int bytes_to_read) {}
114 virtual void OnRequestRead(int tab_handle, int request_id, 110 virtual void OnRequestEnd(int request_id, const URLRequestStatus& status) {}
115 int bytes_to_read) {} 111 virtual void OnDownloadRequestInHost(int request_id) {}
116 virtual void OnRequestEnd(int tab_handle, int request_id, 112 virtual void OnSetCookieAsync(const GURL& url, const std::string& cookie) {}
117 const URLRequestStatus& status) {} 113 virtual void OnAttachExternalTab(
118 virtual void OnDownloadRequestInHost(int tab_handle, int request_id) {} 114 const AttachExternalTabParams& attach_params) {}
119 virtual void OnSetCookieAsync(int tab_handle, const GURL& url, 115 virtual void OnGoToHistoryEntryOffset(int offset) {}
120 const std::string& cookie) {}
121 virtual void OnAttachExternalTab(int tab_handle,
122 const IPC::AttachExternalTabParams& attach_params) {}
123 virtual void OnGoToHistoryEntryOffset(int tab_handle, int offset) {}
124 116
125 virtual void OnGetCookiesFromHost(int tab_handle, const GURL& url, 117 virtual void OnGetCookiesFromHost(const GURL& url, int cookie_id) {}
126 int cookie_id) {} 118 virtual void OnCloseTab() {}
127 virtual void OnCloseTab(int tab_handle) {}
128 }; 119 };
129 120
130 // This interface enables tasks to be marshaled to desired threads. 121 // This interface enables tasks to be marshaled to desired threads.
131 class TaskMarshaller { // NOLINT 122 class TaskMarshaller { // NOLINT
132 public: 123 public:
133 virtual void PostTask(const tracked_objects::Location& from_here, 124 virtual void PostTask(const tracked_objects::Location& from_here,
134 Task* task) = 0; 125 Task* task) = 0;
135 }; 126 };
136 127
137 // T is expected to be something CWindowImpl derived, or at least to have 128 // T is expected to be something CWindowImpl derived, or at least to have
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 197 }
207 198
208 return false; 199 return false;
209 } 200 }
210 201
211 Lock lock_; 202 Lock lock_;
212 std::queue<Task*> pending_tasks_; 203 std::queue<Task*> pending_tasks_;
213 }; 204 };
214 205
215 #endif // CHROME_FRAME_CHROME_FRAME_DELEGATE_H_ 206 #endif // CHROME_FRAME_CHROME_FRAME_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_automation.cc ('k') | chrome_frame/chrome_frame_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698