Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: chrome/common/automation_messages.h

Issue 7167002: Convert RenderViewContextMenu to MenuItemView. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Remove unused utility function. Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Multiply-included message file, no traditional include guard. 5 // Multiply-included message file, no traditional include guard.
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
9 #include "chrome/common/automation_constants.h" 10 #include "chrome/common/automation_constants.h"
10 #include "chrome/common/content_settings.h" 11 #include "chrome/common/content_settings.h"
11 #include "content/common/common_param_traits.h" 12 #include "content/common/common_param_traits.h"
12 #include "content/common/page_type.h" 13 #include "content/common/page_type.h"
13 #include "content/common/security_style.h" 14 #include "content/common/security_style.h"
14 #include "content/common/webkit_param_traits.h" 15 #include "content/common/webkit_param_traits.h"
15 #include "ipc/ipc_message_macros.h" 16 #include "ipc/ipc_message_macros.h"
16 #include "ipc/ipc_message_utils.h" 17 #include "ipc/ipc_message_utils.h"
17 #include "net/base/host_port_pair.h" 18 #include "net/base/host_port_pair.h"
18 #include "net/base/upload_data.h" 19 #include "net/base/upload_data.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 GURL src_url; 142 GURL src_url;
142 143
143 // This is the URL of the top level page that the context menu was invoked 144 // This is the URL of the top level page that the context menu was invoked
144 // on. 145 // on.
145 GURL page_url; 146 GURL page_url;
146 147
147 // This is the URL of the subframe that the context menu was invoked on. 148 // This is the URL of the subframe that the context menu was invoked on.
148 GURL frame_url; 149 GURL frame_url;
149 }; 150 };
150 151
152 struct ContextMenuModel {
ananta 2011/06/17 19:03:38 Please add some comments describing this structure
rhashimoto 2011/06/17 23:34:36 Done.
153 ~ContextMenuModel();
154
155 struct Item {
156 Item();
157
158 int type;
159 int item_id;
160 std::wstring label;
161 bool checked;
162 bool enabled;
163 ContextMenuModel* submenu;
164 };
165
166 std::vector<Item> items;
ananta 2011/06/17 19:03:38 Please include vector.h in this file.
rhashimoto 2011/06/17 23:34:36 Done.
167 };
168
151 struct AttachExternalTabParams { 169 struct AttachExternalTabParams {
152 AttachExternalTabParams(); 170 AttachExternalTabParams();
153 AttachExternalTabParams(uint64 cookie, 171 AttachExternalTabParams(uint64 cookie,
154 const GURL& url, 172 const GURL& url,
155 const gfx::Rect& dimensions, 173 const gfx::Rect& dimensions,
156 int disposition, 174 int disposition,
157 bool user_gesture, 175 bool user_gesture,
158 const std::string& profile_name); 176 const std::string& profile_name);
159 ~AttachExternalTabParams(); 177 ~AttachExternalTabParams();
160 178
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 360
343 // Traits for MiniContextMenuParams structure to pack/unpack. 361 // Traits for MiniContextMenuParams structure to pack/unpack.
344 template <> 362 template <>
345 struct ParamTraits<MiniContextMenuParams> { 363 struct ParamTraits<MiniContextMenuParams> {
346 typedef MiniContextMenuParams param_type; 364 typedef MiniContextMenuParams param_type;
347 static void Write(Message* m, const param_type& p); 365 static void Write(Message* m, const param_type& p);
348 static bool Read(const Message* m, void** iter, param_type* p); 366 static bool Read(const Message* m, void** iter, param_type* p);
349 static void Log(const param_type& p, std::string* l); 367 static void Log(const param_type& p, std::string* l);
350 }; 368 };
351 369
370 // Traits for ContextMenuModel structure to pack/unpack.
371 template <>
372 struct ParamTraits<ContextMenuModel> {
373 typedef ContextMenuModel param_type;
374 static void Write(Message* m, const param_type& p);
375 static bool Read(const Message* m, void** iter, param_type* p);
376 static void Log(const param_type& p, std::string* l);
377 };
378
352 template <> 379 template <>
353 struct ParamTraits<AttachExternalTabParams> { 380 struct ParamTraits<AttachExternalTabParams> {
354 typedef AttachExternalTabParams param_type; 381 typedef AttachExternalTabParams param_type;
355 static void Write(Message* m, const param_type& p); 382 static void Write(Message* m, const param_type& p);
356 static bool Read(const Message* m, void** iter, param_type* p); 383 static bool Read(const Message* m, void** iter, param_type* p);
357 static void Log(const param_type& p, std::string* l); 384 static void Log(const param_type& p, std::string* l);
358 }; 385 };
359 386
360 } // namespace IPC 387 } // namespace IPC
361 388
362 #endif // CHROME_COMMON_AUTOMATION_MESSAGES_H__ 389 #endif // CHROME_COMMON_AUTOMATION_MESSAGES_H__
363 390
364 // Keep this internal message file unchanged to preserve line numbering 391 // Keep this internal message file unchanged to preserve line numbering
365 // (and hence the dubious __LINE__-based message numberings) across versions. 392 // (and hence the dubious __LINE__-based message numberings) across versions.
366 #include "chrome/common/automation_messages_internal.h" 393 #include "chrome/common/automation_messages_internal.h"
367 394
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698