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

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

Issue 21399: Revert r9861 to fix build (Closed)
Patch Set: Created 11 years, 10 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include <map> 10 #include <map>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/gfx/native_widget_types.h" 13 #include "base/gfx/native_widget_types.h"
14 #include "base/ref_counted.h" 14 #include "base/ref_counted.h"
15 #include "base/shared_memory.h" 15 #include "base/shared_memory.h"
16 #include "chrome/browser/renderer_host/resource_handler.h" 16 #include "chrome/browser/renderer_host/resource_handler.h"
17 #include "chrome/common/accessibility.h" 17 #include "chrome/common/accessibility.h"
18 #include "chrome/common/bitmap_wire_data.h" 18 #include "chrome/common/bitmap_wire_data.h"
19 #include "chrome/common/filter_policy.h" 19 #include "chrome/common/filter_policy.h"
20 #include "chrome/common/ipc_message_utils.h" 20 #include "chrome/common/ipc_message_utils.h"
21 #include "chrome/common/modal_dialog_event.h" 21 #include "chrome/common/modal_dialog_event.h"
22 #include "chrome/common/page_transition_types.h" 22 #include "chrome/common/page_transition_types.h"
23 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
24 #include "media/audio/audio_output.h"
25 #include "net/base/upload_data.h" 24 #include "net/base/upload_data.h"
26 #include "net/url_request/url_request_status.h" 25 #include "net/url_request/url_request_status.h"
27 #include "webkit/glue/autofill_form.h" 26 #include "webkit/glue/autofill_form.h"
28 #include "webkit/glue/cache_manager.h" 27 #include "webkit/glue/cache_manager.h"
29 #include "webkit/glue/context_menu.h" 28 #include "webkit/glue/context_menu.h"
30 #include "webkit/glue/form_data.h" 29 #include "webkit/glue/form_data.h"
31 #include "webkit/glue/password_form.h" 30 #include "webkit/glue/password_form.h"
32 #include "webkit/glue/password_form_dom_manager.h" 31 #include "webkit/glue/password_form_dom_manager.h"
33 #include "webkit/glue/resource_loader_bridge.h" 32 #include "webkit/glue/resource_loader_bridge.h"
34 #include "webkit/glue/screen_info.h" 33 #include "webkit/glue/screen_info.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 double actual_shrink; 317 double actual_shrink;
319 }; 318 };
320 319
321 // The first parameter for the ViewHostMsg_ImeUpdateStatus message. 320 // The first parameter for the ViewHostMsg_ImeUpdateStatus message.
322 enum ViewHostMsg_ImeControl { 321 enum ViewHostMsg_ImeControl {
323 IME_DISABLE = 0, 322 IME_DISABLE = 0,
324 IME_MOVE_WINDOWS, 323 IME_MOVE_WINDOWS,
325 IME_COMPLETE_COMPOSITION, 324 IME_COMPLETE_COMPOSITION,
326 }; 325 };
327 326
328 // Parameters for creating an audio output stream.
329 struct ViewHostMsg_Audio_CreateStream {
330 // Format request for the stream.
331 AudioManager::Format format;
332
333 // Number of channels.
334 int channels;
335
336 // Sampling rate (frequency) of the output stream.
337 int sample_rate;
338
339 // Number of bits per sample;
340 int bits_per_sample;
341
342 // Number of bytes per packet.
343 size_t packet_size;
344 };
345 327
346 namespace IPC { 328 namespace IPC {
347 329
348 template <> 330 template <>
349 struct ParamTraits<ResourceType::Type> { 331 struct ParamTraits<ResourceType::Type> {
350 typedef ResourceType::Type param_type; 332 typedef ResourceType::Type param_type;
351 static void Write(Message* m, const param_type& p) { 333 static void Write(Message* m, const param_type& p) {
352 m->WriteInt(p); 334 m->WriteInt(p);
353 } 335 }
354 static bool Read(const Message* m, void** iter, param_type* p) { 336 static bool Read(const Message* m, void** iter, param_type* p) {
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 static bool Read(const Message* m, void** iter, param_type* p) { 1580 static bool Read(const Message* m, void** iter, param_type* p) {
1599 return true; 1581 return true;
1600 } 1582 }
1601 #endif 1583 #endif
1602 1584
1603 static void Log(const param_type& p, std::wstring* l) { 1585 static void Log(const param_type& p, std::wstring* l) {
1604 l->append(L"<ModalDialogEvent>"); 1586 l->append(L"<ModalDialogEvent>");
1605 } 1587 }
1606 }; 1588 };
1607 1589
1608 // Traits for AudioManager::Format.
1609 template <>
1610 struct ParamTraits<AudioManager::Format> {
1611 typedef AudioManager::Format param_type;
1612 static void Write(Message* m, const param_type& p) {
1613 m->WriteInt(p);
1614 }
1615 static bool Read(const Message* m, void** iter, param_type* p) {
1616 int type;
1617 if (!m->ReadInt(iter, &type))
1618 return false;
1619 *p = static_cast<AudioManager::Format>(type);
1620 return true;
1621 }
1622 static void Log(const param_type& p, std::wstring* l) {
1623 std::wstring format;
1624 switch (p) {
1625 case AudioManager::AUDIO_PCM_LINEAR:
1626 format = L"AUDIO_PCM_LINEAR";
1627 break;
1628 case AudioManager::AUDIO_PCM_DELTA:
1629 format = L"AUDIO_PCM_DELTA";
1630 break;
1631 case AudioManager::AUDIO_MOCK:
1632 format = L"AUDIO_MOCK";
1633 break;
1634 default:
1635 format = L"AUDIO_LAST_FORMAT";
1636 break;
1637 }
1638 LogParam(format, l);
1639 }
1640 };
1641
1642 // Traits for ViewHostMsg_Audio_CreateStream.
1643 template <>
1644 struct ParamTraits<ViewHostMsg_Audio_CreateStream> {
1645 typedef ViewHostMsg_Audio_CreateStream param_type;
1646 static void Write(Message* m, const param_type& p) {
1647 WriteParam(m, p.format);
1648 WriteParam(m, p.channels);
1649 WriteParam(m, p.sample_rate);
1650 WriteParam(m, p.bits_per_sample);
1651 WriteParam(m, p.packet_size);
1652 }
1653 static bool Read(const Message* m, void** iter, param_type* p) {
1654 return
1655 ReadParam(m, iter, &p->format) &&
1656 ReadParam(m, iter, &p->channels) &&
1657 ReadParam(m, iter, &p->sample_rate) &&
1658 ReadParam(m, iter, &p->bits_per_sample) &&
1659 ReadParam(m, iter, &p->packet_size);
1660 }
1661 static void Log(const param_type& p, std::wstring* l) {
1662 l->append(L"<ViewHostMsg_Audio_CreateStream>(");
1663 LogParam(p.format, l);
1664 l->append(L", ");
1665 LogParam(p.channels, l);
1666 l->append(L", ");
1667 LogParam(p.sample_rate, l);
1668 l->append(L", ");
1669 LogParam(p.bits_per_sample, l);
1670 l->append(L", ");
1671 LogParam(p.packet_size, l);
1672 l->append(L")");
1673 }
1674 };
1675
1676
1677 #if defined(OS_POSIX) 1590 #if defined(OS_POSIX)
1678 1591
1679 // TODO(port): this shouldn't exist. However, the plugin stuff is really using 1592 // TODO(port): this shouldn't exist. However, the plugin stuff is really using
1680 // HWNDS (NativeView), and making Windows calls based on them. I've not figured 1593 // HWNDS (NativeView), and making Windows calls based on them. I've not figured
1681 // out the deal with plugins yet. 1594 // out the deal with plugins yet.
1682 template <> 1595 template <>
1683 struct ParamTraits<gfx::NativeView> { 1596 struct ParamTraits<gfx::NativeView> {
1684 typedef gfx::NativeView param_type; 1597 typedef gfx::NativeView param_type;
1685 static void Write(Message* m, const param_type& p) { 1598 static void Write(Message* m, const param_type& p) {
1686 NOTIMPLEMENTED(); 1599 NOTIMPLEMENTED();
(...skipping 12 matching lines...) Expand all
1699 1612
1700 #endif // defined(OS_POSIX) 1613 #endif // defined(OS_POSIX)
1701 1614
1702 } // namespace IPC 1615 } // namespace IPC
1703 1616
1704 1617
1705 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 1618 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
1706 #include "chrome/common/ipc_message_macros.h" 1619 #include "chrome/common/ipc_message_macros.h"
1707 1620
1708 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 1621 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698