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

Side by Side Diff: content/child/npapi/plugin_instance_mac.mm

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 years, 5 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) 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 #import <AppKit/AppKit.h> 5 #import <AppKit/AppKit.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "webkit/plugins/npapi/plugin_instance.h" 9 #include "content/child/npapi/plugin_instance.h"
10 10
11 // When C++ exceptions are disabled, the C++ library defines |try| and 11 // When C++ exceptions are disabled, the C++ library defines |try| and
12 // |catch| so as to allow exception-expecting C++ code to build properly when 12 // |catch| so as to allow exception-expecting C++ code to build properly when
13 // language support for exceptions is not present. These macros interfere 13 // language support for exceptions is not present. These macros interfere
14 // with the use of |@try| and |@catch| in Objective-C files such as this one. 14 // with the use of |@try| and |@catch| in Objective-C files such as this one.
15 // Undefine these macros here, after everything has been #included, since 15 // Undefine these macros here, after everything has been #included, since
16 // there will be no C++ uses and only Objective-C uses from this point on. 16 // there will be no C++ uses and only Objective-C uses from this point on.
17 #undef try 17 #undef try
18 #undef catch 18 #undef catch
19 19
20 namespace webkit { 20 namespace content {
21 namespace npapi {
22 21
23 namespace { 22 namespace {
24 23
25 // Returns an autoreleased NSEvent constructed from the given np_event, 24 // Returns an autoreleased NSEvent constructed from the given np_event,
26 // targeting the given window. 25 // targeting the given window.
27 NSEvent* NSEventForNPCocoaEvent(NPCocoaEvent* np_event, NSWindow* window) { 26 NSEvent* NSEventForNPCocoaEvent(NPCocoaEvent* np_event, NSWindow* window) {
28 bool mouse_down = 1; 27 bool mouse_down = 1;
29 switch (np_event->type) { 28 switch (np_event->type) {
30 case NPCocoaEventMouseDown: 29 case NPCocoaEventMouseDown:
31 mouse_down = 1; 30 mouse_down = 1;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 ScopedCurrentPluginEvent::ScopedCurrentPluginEvent(PluginInstance* instance, 96 ScopedCurrentPluginEvent::ScopedCurrentPluginEvent(PluginInstance* instance,
98 NPCocoaEvent* event) 97 NPCocoaEvent* event)
99 : instance_(instance) { 98 : instance_(instance) {
100 instance_->set_currently_handled_event(event); 99 instance_->set_currently_handled_event(event);
101 } 100 }
102 101
103 ScopedCurrentPluginEvent::~ScopedCurrentPluginEvent() { 102 ScopedCurrentPluginEvent::~ScopedCurrentPluginEvent() {
104 instance_->set_currently_handled_event(NULL); 103 instance_->set_currently_handled_event(NULL);
105 } 104 }
106 105
107 } // namespace npapi 106 } // namespace content
108 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698