diff options
Diffstat (limited to 'chromium/extensions/browser/app_window/app_window_client.cc')
-rw-r--r-- | chromium/extensions/browser/app_window/app_window_client.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chromium/extensions/browser/app_window/app_window_client.cc b/chromium/extensions/browser/app_window/app_window_client.cc new file mode 100644 index 00000000000..4b71b96b134 --- /dev/null +++ b/chromium/extensions/browser/app_window/app_window_client.cc @@ -0,0 +1,28 @@ +// Copyright 2014 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. + +#include "extensions/browser/app_window/app_window_client.h" + + +namespace extensions { + +namespace { + +AppWindowClient* g_client = NULL; + +} // namespace + +AppWindowClient* AppWindowClient::Get() { + return g_client; +} + +void AppWindowClient::Set(AppWindowClient* client) { + // This can happen in unit tests, where the utility thread runs in-process. + if (g_client) + return; + + g_client = client; +} + +} // namespace extensions |