diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 23:26:02 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-15 23:26:02 +0000 |
commit | f8c2c0bd79ea4cbafe326f92cd6d4b60e0e0ae71 (patch) | |
tree | 555b4389d14e8fbe10805de9013fcb1c5763ef5a /chrome/browser/dock_info.cc | |
parent | a51bf895ffc17144c2094acf550b0ab2bf00bb5e (diff) | |
download | chromium_src-f8c2c0bd79ea4cbafe326f92cd6d4b60e0e0ae71.zip chromium_src-f8c2c0bd79ea4cbafe326f92cd6d4b60e0e0ae71.tar.gz chromium_src-f8c2c0bd79ea4cbafe326f92cd6d4b60e0e0ae71.tar.bz2 |
Adds a factory method for creating DockInfos.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/75015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dock_info.cc')
-rw-r--r-- | chrome/browser/dock_info.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/dock_info.cc b/chrome/browser/dock_info.cc index 92ee871..a9c2561 100644 --- a/chrome/browser/dock_info.cc +++ b/chrome/browser/dock_info.cc @@ -331,8 +331,14 @@ class DockToWindowFinder : public BaseWindowFinder { // DockInfo ------------------------------------------------------------------- // static +DockInfo::Factory* DockInfo::factory_ = NULL; + +// static DockInfo DockInfo::GetDockInfoAtPoint(const gfx::Point& screen_point, const std::set<HWND>& ignore) { + if (factory_) + return factory_->GetDockInfoAtPoint(screen_point, ignore); + // Try docking to a window first. DockInfo info = DockToWindowFinder::GetDockInfoAtPoint(screen_point, ignore); if (info.type() != DockInfo::NONE) @@ -368,6 +374,8 @@ int DockInfo::popup_height() { HWND DockInfo::GetLocalProcessWindowAtPoint(const gfx::Point& screen_point, const std::set<HWND>& ignore) { + if (factory_) + return factory_->GetLocalProcessWindowAtPoint(screen_point, ignore); return LocalProcessWindowFinder::GetProcessWindowAtPoint(screen_point, ignore); } |