Chromium Code Reviews| Index: chrome/browser/ui/views/athena/athena_util.cc |
| diff --git a/chrome/browser/ui/views/athena/athena_util.cc b/chrome/browser/ui/views/athena/athena_util.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ee7899bfc412f73a9dd6502fba91c4f7d0e03cec |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/athena/athena_util.cc |
| @@ -0,0 +1,23 @@ |
| +// 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 "chrome/browser/ui/views/athena/athena_util.h" |
| + |
| +#include "athena/activity/public/activity.h" |
| +#include "athena/activity/public/activity_manager.h" |
| +#include "athena/wm/public/window_list_provider.h" |
| +#include "athena/wm/public/window_manager.h" |
| + |
| +content::WebContents* GetWebContentsForWindow( |
| + aura::Window* owner_window) { |
|
Jun Mukai
2014/09/25 00:24:05
Doesn't this fit into the previous line?
oshima
2014/09/25 00:36:06
reformatted by 'git cl format'
|
| + if (!owner_window) { |
| + athena::WindowListProvider* window_list = |
| + athena::WindowManager::Get()->GetWindowListProvider(); |
| + DCHECK(window_list->GetWindowList().size()); |
| + owner_window = window_list->GetWindowList().back(); |
| + } |
| + athena::Activity* activity = |
| + athena::ActivityManager::Get()->GetActivityForWindow(owner_window); |
| + return activity->GetWebContents(); |
| +} |