Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7838)

Unified Diff: chrome/browser/ui/views/athena/athena_util.cc

Issue 603033002: Get FileSelect dialog work on athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reformat Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..145524e327aacb7afa34c96450617bac98d78b7e
--- /dev/null
+++ b/chrome/browser/ui/views/athena/athena_util.cc
@@ -0,0 +1,22 @@
+// 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) {
+ 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();
+}
« no previous file with comments | « chrome/browser/ui/views/athena/athena_util.h ('k') | chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698