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

Side by Side Diff: athena/content/app_activity.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 unified diff | Download patch
« no previous file with comments | « athena/content/app_activity.h ('k') | athena/content/app_activity_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/content/app_activity.h" 5 #include "athena/content/app_activity.h"
6 6
7 #include "athena/activity/public/activity_manager.h" 7 #include "athena/activity/public/activity_manager.h"
8 #include "athena/content/app_activity_registry.h" 8 #include "athena/content/app_activity_registry.h"
9 #include "athena/content/content_proxy.h" 9 #include "athena/content/content_proxy.h"
10 #include "athena/content/public/app_registry.h" 10 #include "athena/content/public/app_registry.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // TODO(skuhne): The function GetTabMediaStateForContents(WebContents), 89 // TODO(skuhne): The function GetTabMediaStateForContents(WebContents),
90 // and the AudioStreamMonitor needs to be moved from Chrome into contents to 90 // and the AudioStreamMonitor needs to be moved from Chrome into contents to
91 // make it more modular and so that we can use it from here. 91 // make it more modular and so that we can use it from here.
92 return Activity::ACTIVITY_MEDIA_STATE_NONE; 92 return Activity::ACTIVITY_MEDIA_STATE_NONE;
93 } 93 }
94 94
95 aura::Window* AppActivity::GetWindow() { 95 aura::Window* AppActivity::GetWindow() {
96 return !web_view_ ? NULL : web_view_->GetWidget()->GetNativeWindow(); 96 return !web_view_ ? NULL : web_view_->GetWidget()->GetNativeWindow();
97 } 97 }
98 98
99 content::WebContents* AppActivity::GetWebContents() {
100 return !web_view_ ? NULL : web_view_->GetWebContents();
101 }
102
99 void AppActivity::Init() { 103 void AppActivity::Init() {
100 DCHECK(app_activity_registry_); 104 DCHECK(app_activity_registry_);
101 Activity* app_proxy = app_activity_registry_->unloaded_activity_proxy(); 105 Activity* app_proxy = app_activity_registry_->unloaded_activity_proxy();
102 if (app_proxy) { 106 if (app_proxy) {
103 // Note: At this time the |AppActivity| did not get registered to the 107 // Note: At this time the |AppActivity| did not get registered to the
104 // |ResourceManager| - so we can move it around if needed. 108 // |ResourceManager| - so we can move it around if needed.
105 WindowListProvider* window_list_provider = 109 WindowListProvider* window_list_provider =
106 WindowManager::Get()->GetWindowListProvider(); 110 WindowManager::Get()->GetWindowListProvider();
107 window_list_provider->StackWindowFrontOf(app_proxy->GetWindow(), 111 window_list_provider->StackWindowFrontOf(app_proxy->GetWindow(),
108 GetWindow()); 112 GetWindow());
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void AppActivity::HideContentProxy() { 213 void AppActivity::HideContentProxy() {
210 content_proxy_.reset(); 214 content_proxy_.reset();
211 } 215 }
212 216
213 void AppActivity::ShowContentProxy() { 217 void AppActivity::ShowContentProxy() {
214 if (!content_proxy_.get() && web_view_) 218 if (!content_proxy_.get() && web_view_)
215 content_proxy_.reset(new ContentProxy(web_view_, this)); 219 content_proxy_.reset(new ContentProxy(web_view_, this));
216 } 220 }
217 221
218 } // namespace athena 222 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/app_activity.h ('k') | athena/content/app_activity_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698