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

Side by Side Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 791923003: replace COMPILE_ASSERT with static_assert in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixups Created 5 years, 11 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) 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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #import "content/browser/web_contents/web_contents_view_mac.h" 7 #import "content/browser/web_contents/web_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 using content::PopupMenuHelper; 36 using content::PopupMenuHelper;
37 using content::RenderViewHostFactory; 37 using content::RenderViewHostFactory;
38 using content::RenderWidgetHostView; 38 using content::RenderWidgetHostView;
39 using content::RenderWidgetHostViewMac; 39 using content::RenderWidgetHostViewMac;
40 using content::WebContents; 40 using content::WebContents;
41 using content::WebContentsImpl; 41 using content::WebContentsImpl;
42 using content::WebContentsViewMac; 42 using content::WebContentsViewMac;
43 43
44 // Ensure that the blink::WebDragOperation enum values stay in sync with 44 // Ensure that the blink::WebDragOperation enum values stay in sync with
45 // NSDragOperation constants, since the code below static_casts between 'em. 45 // NSDragOperation constants, since the code below static_casts between 'em.
46 #define COMPILE_ASSERT_MATCHING_ENUM(name) \ 46 #define STATIC_ASSERT_MATCHING_ENUM(name) \
47 COMPILE_ASSERT(int(NS##name) == int(blink::Web##name), enum_mismatch_##name) 47 static_assert(int(NS##name) == int(blink::Web##name), "enum mismatch: " #name)
48 COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); 48 STATIC_ASSERT_MATCHING_ENUM(DragOperationNone);
49 COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); 49 STATIC_ASSERT_MATCHING_ENUM(DragOperationCopy);
50 COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); 50 STATIC_ASSERT_MATCHING_ENUM(DragOperationLink);
51 COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); 51 STATIC_ASSERT_MATCHING_ENUM(DragOperationGeneric);
52 COMPILE_ASSERT_MATCHING_ENUM(DragOperationPrivate); 52 STATIC_ASSERT_MATCHING_ENUM(DragOperationPrivate);
53 COMPILE_ASSERT_MATCHING_ENUM(DragOperationMove); 53 STATIC_ASSERT_MATCHING_ENUM(DragOperationMove);
54 COMPILE_ASSERT_MATCHING_ENUM(DragOperationDelete); 54 STATIC_ASSERT_MATCHING_ENUM(DragOperationDelete);
55 COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery); 55 STATIC_ASSERT_MATCHING_ENUM(DragOperationEvery);
56 56
57 @interface WebContentsViewCocoa (Private) 57 @interface WebContentsViewCocoa (Private)
58 - (id)initWithWebContentsViewMac:(WebContentsViewMac*)w; 58 - (id)initWithWebContentsViewMac:(WebContentsViewMac*)w;
59 - (void)registerDragTypes; 59 - (void)registerDragTypes;
60 - (void)setCurrentDragOperation:(NSDragOperation)operation; 60 - (void)setCurrentDragOperation:(NSDragOperation)operation;
61 - (DropData*)dropData; 61 - (DropData*)dropData;
62 - (void)startDragWithDropData:(const DropData&)dropData 62 - (void)startDragWithDropData:(const DropData&)dropData
63 dragOperationMask:(NSDragOperation)operationMask 63 dragOperationMask:(NSDragOperation)operationMask
64 image:(NSImage*)image 64 image:(NSImage*)image
65 offset:(NSPoint)offset; 65 offset:(NSPoint)offset;
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 if (!webContents->should_normally_be_visible()) 638 if (!webContents->should_normally_be_visible())
639 webContents->WasShown(); 639 webContents->WasShown();
640 } else { 640 } else {
641 if (webContents->should_normally_be_visible()) 641 if (webContents->should_normally_be_visible())
642 webContents->WasHidden(); 642 webContents->WasHidden();
643 } 643 }
644 } 644 }
645 } 645 }
646 646
647 @end 647 @end
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognizer_impl.cc ('k') | content/child/assert_matching_enums.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698