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

Side by Side Diff: webkit/glue/plugins/fake_plugin_window_tracker_mac.h

Issue 164100: Set up a interposing library for Carbon calls made by plugins. (Closed)
Patch Set: Review comments and files that were lost in the move Created 11 years, 4 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 | « chrome/plugin/plugin_main.cc ('k') | webkit/glue/plugins/fake_plugin_window_tracker_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_GLUE_PLUGINS_FAKE_PLUGIN_WINDOW_TRACKER_MAC_H_
6 #define WEBKIT_GLUE_PLUGINS_FAKE_PLUGIN_WINDOW_TRACKER_MAC_H_
7
8 #include <Carbon/Carbon.h>
9
10 #include "base/basictypes.h"
11 #include "base/scoped_cftyperef.h"
12
13 class WebPluginDelegateImpl;
14
15 // Serves as a bridge between password delegate instances and the Carbon
16 // interposing library. The Carbon functions we interpose work in terms of
17 // WindowRefs, and we need to be able to map from those back to the plugin
18 // delegates that know what we should claim about the state of the world.
19 class __attribute__((visibility("default"))) FakePluginWindowTracker {
20 public:
21 FakePluginWindowTracker();
22
23 // Returns the shared window tracker instance.
24 static FakePluginWindowTracker* SharedInstance();
25
26 // Creates a new fake window ref associated with |delegate|.
27 WindowRef GenerateFakeWindowForDelegate(WebPluginDelegateImpl* delegate);
28
29 // Returns the WebPluginDelegate associated with the given fake window ref.
30 const WebPluginDelegateImpl* GetDelegateForFakeWindow(WindowRef window) const;
31
32 // Removes the fake window ref entry for |delegate|.
33 void RemoveFakeWindowForDelegate(WebPluginDelegateImpl* delegate,
34 WindowRef window);
35
36 private:
37 scoped_cftyperef<CFMutableDictionaryRef> window_to_delegate_map_;
38
39 DISALLOW_COPY_AND_ASSIGN(FakePluginWindowTracker);
40 };
41
42 #endif // WEBKIT_GLUE_PLUGINS_FAKE_PLUGIN_WINDOW_TRACKER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/plugin/plugin_main.cc ('k') | webkit/glue/plugins/fake_plugin_window_tracker_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698