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

Side by Side Diff: content/common/view_messages.h

Issue 1091773002: Apply automatic range checks to content enum types across IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply automatic range checks to content enum types across IPC. Created 5 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
« no previous file with comments | « no previous file | content/public/common/window_container_type.h » ('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 // IPC messages for page rendering. 5 // IPC messages for page rendering.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type, 79 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebMediaPlayerAction::Type,
80 blink::WebMediaPlayerAction::Type::TypeLast) 80 blink::WebMediaPlayerAction::Type::TypeLast)
81 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type, 81 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPluginAction::Type,
82 blink::WebPluginAction::Type::TypeLast) 82 blink::WebPluginAction::Type::TypeLast)
83 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType, 83 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPopupType,
84 blink::WebPopupType::WebPopupTypeLast) 84 blink::WebPopupType::WebPopupTypeLast)
85 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection, 85 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTextDirection,
86 blink::WebTextDirection::WebTextDirectionLast) 86 blink::WebTextDirection::WebTextDirectionLast)
87 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDisplayMode, 87 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebDisplayMode,
88 blink::WebDisplayMode::WebDisplayModeLast) 88 blink::WebDisplayMode::WebDisplayModeLast)
89 IPC_ENUM_TRAITS(WindowContainerType) 89 IPC_ENUM_TRAITS_MAX_VALUE(WindowContainerType, WINDOW_CONTAINER_TYPE_MAX_VALUE)
90 IPC_ENUM_TRAITS(content::FaviconURL::IconType) 90 IPC_ENUM_TRAITS(content::FaviconURL::IconType)
91 IPC_ENUM_TRAITS(content::FileChooserParams::Mode) 91 IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
92 IPC_ENUM_TRAITS(content::MenuItem::Type) 92 IPC_ENUM_TRAITS(content::MenuItem::Type)
93 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture, 93 IPC_ENUM_TRAITS_MAX_VALUE(content::NavigationGesture,
94 content::NavigationGestureLast) 94 content::NavigationGestureLast)
95 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom, 95 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom,
96 content::PageZoom::PAGE_ZOOM_OUT, 96 content::PageZoom::PAGE_ZOOM_OUT,
97 content::PageZoom::PAGE_ZOOM_IN) 97 content::PageZoom::PAGE_ZOOM_IN)
98 IPC_ENUM_TRAITS(gfx::FontRenderParams::Hinting) 98 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting,
99 IPC_ENUM_TRAITS(gfx::FontRenderParams::SubpixelRendering) 99 gfx::FontRenderParams::HINTING_MAX)
100 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering,
101 gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX)
100 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy, 102 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy,
101 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX) 103 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX)
102 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction, 104 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction,
103 content::STOP_FIND_ACTION_LAST) 105 content::STOP_FIND_ACTION_LAST)
104 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType, 106 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType,
105 content::THREE_D_API_TYPE_LAST) 107 content::THREE_D_API_TYPE_LAST)
106 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX - 1) 108 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX - 1)
107 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type, 109 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type,
108 media::MediaLogEvent::TYPE_LAST) 110 media::MediaLogEvent::TYPE_LAST)
109 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX) 111 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX)
110 IPC_ENUM_TRAITS(ui::TextInputType) 112 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputType, ui::TEXT_INPUT_TYPE_MAX)
111 113
112 #if defined(OS_MACOSX) 114 #if defined(OS_MACOSX)
113 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) 115 IPC_STRUCT_TRAITS_BEGIN(FontDescriptor)
114 IPC_STRUCT_TRAITS_MEMBER(font_name) 116 IPC_STRUCT_TRAITS_MEMBER(font_name)
115 IPC_STRUCT_TRAITS_MEMBER(font_point_size) 117 IPC_STRUCT_TRAITS_MEMBER(font_point_size)
116 IPC_STRUCT_TRAITS_END() 118 IPC_STRUCT_TRAITS_END()
117 #endif 119 #endif
118 120
119 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) 121 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions)
120 IPC_STRUCT_TRAITS_MEMBER(forward) 122 IPC_STRUCT_TRAITS_MEMBER(forward)
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters 1630 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
1629 // for details. 1631 // for details.
1630 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters, 1632 IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_PreCacheFontCharacters,
1631 LOGFONT /* font_data */, 1633 LOGFONT /* font_data */,
1632 base::string16 /* characters */) 1634 base::string16 /* characters */)
1633 #endif 1635 #endif
1634 1636
1635 // Adding a new message? Stick to the sort order above: first platform 1637 // Adding a new message? Stick to the sort order above: first platform
1636 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform 1638 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1637 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. 1639 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.
OLDNEW
« no previous file with comments | « no previous file | content/public/common/window_container_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698