blob: 12358b5933efc343af1cd8b11fb4ed2e84228683 (
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
|
// Copyright (c) 2006-2008 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_BROWSER_FRAME_UTIL_H_
#define CHROME_BROWSER_FRAME_UTIL_H_
#include <windows.h>
class Browser;
class BrowserWindow;
namespace ChromeViews {
class AcceleratorTarget;
}
namespace gfx {
class Rect;
}
// Static helpers for frames. Basically shared code until Magic Browzr lands.
class FrameUtil {
public:
// Mark the frame such as it can be retrieved using GetChromeFrameForWindow()
static void RegisterBrowserWindow(BrowserWindow* frame);
// Return a ChromeFrame instance given an hwnd.
static BrowserWindow* GetBrowserWindowForHWND(HWND hwnd);
// Create a ChromeFrame for the given browser.
static BrowserWindow* CreateBrowserWindow(const gfx::Rect& bounds,
Browser* browser);
// Initialize the accelerators for that frame.
static bool LoadAccelerators(
BrowserWindow* frame,
HACCEL accelerator_table,
ChromeViews::AcceleratorTarget* accelerator_target);
// Activate any app modal dialog that might be present. Returns true if one
// was present.
static bool ActivateAppModalDialog(Browser* browser);
// Invoked when windows is shutting down (or the user is logging off). When
// this method returns windows is going to kill our process. As such, this
// blocks until the shut-down has been marked as clean.
static void EndSession();
};
#endif // #ifndef CHROME_BROWSER_FRAME_UTIL_H__
|