blob: 00119a771be3e4fb1b328b7850140f3bab016eac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_PLUGIN_PLUGIN_INTERPOSE_UTIL_MAC_H_
#define CHROME_PLUGIN_PLUGIN_INTERPOSE_UTIL_MAC_H_
#pragma once
#include <Carbon/Carbon.h>
#import "base/basictypes.h"
class WebPluginDelegateImpl;
namespace mac_plugin_interposing {
// Swizzles methods we need to watch in order to manage process and window
// focus correctly.
void SetUpCocoaInterposing();
// Brings the plugin process to the front so that the user can see its windows.
void SwitchToPluginProcess();
// Returns the delegate currently processing events.
WebPluginDelegateImpl* GetActiveDelegate();
// Sends a message to the browser process to inform it that the given window
// has been brought forward.
void NotifyBrowserOfPluginSelectWindow(uint32 window_id, CGRect bounds,
bool modal);
// Sends a message to the browser process to inform it that the given window
// has been shown.
void NotifyBrowserOfPluginShowWindow(uint32 window_id, CGRect bounds,
bool modal);
// Sends a message to the browser process to inform it that the given window
// has been hidden, and switches focus back to the browser process if there are
// no remaining plugin windows.
void NotifyBrowserOfPluginHideWindow(uint32 window_id, CGRect bounds);
// Sends a message to the plugin that a theme cursor was set.
void NotifyPluginOfSetThemeCursor(WebPluginDelegateImpl* delegate,
ThemeCursor cursor);
// Sends a message to the plugin that a cursor was set.
void NotifyPluginOfSetCursor(WebPluginDelegateImpl* delegate,
const Cursor* cursor);
// Returns true if the window containing the given plugin delegate is focused.
bool GetPluginWindowHasFocus(const WebPluginDelegateImpl* delegate);
} // namespace MacPluginInterpose
#endif // CHROME_PLUGIN_PLUGIN_INTERPOSE_UTIL_MAC_H_
|