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

Side by Side Diff: athena/content/web_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, 2 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/web_activity.h ('k') | athena/test/sample_activity.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/web_activity.h" 5 #include "athena/content/web_activity.h"
6 6
7 #include "athena/activity/public/activity_factory.h" 7 #include "athena/activity/public/activity_factory.h"
8 #include "athena/activity/public/activity_manager.h" 8 #include "athena/activity/public/activity_manager.h"
9 #include "athena/content/content_proxy.h" 9 #include "athena/content/content_proxy.h"
10 #include "athena/content/public/dialogs.h" 10 #include "athena/content/public/dialogs.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 // TODO(skuhne): The function GetTabMediaStateForContents(WebContents), 493 // TODO(skuhne): The function GetTabMediaStateForContents(WebContents),
494 // and the AudioStreamMonitor needs to be moved from Chrome into contents to 494 // and the AudioStreamMonitor needs to be moved from Chrome into contents to
495 // make it more modular and so that we can use it from here. 495 // make it more modular and so that we can use it from here.
496 return Activity::ACTIVITY_MEDIA_STATE_NONE; 496 return Activity::ACTIVITY_MEDIA_STATE_NONE;
497 } 497 }
498 498
499 aura::Window* WebActivity::GetWindow() { 499 aura::Window* WebActivity::GetWindow() {
500 return !web_view_ ? NULL : web_view_->GetWidget()->GetNativeWindow(); 500 return !web_view_ ? NULL : web_view_->GetWidget()->GetNativeWindow();
501 } 501 }
502 502
503 content::WebContents* WebActivity::GetWebContents() {
504 return !web_view_ ? NULL : web_view_->GetWebContents();
505 }
506
503 void WebActivity::Init() { 507 void WebActivity::Init() {
504 DCHECK(web_view_); 508 DCHECK(web_view_);
505 web_view_->InstallAccelerators(); 509 web_view_->InstallAccelerators();
506 } 510 }
507 511
508 SkColor WebActivity::GetRepresentativeColor() const { 512 SkColor WebActivity::GetRepresentativeColor() const {
509 return web_view_ ? title_color_ : kDefaultUnavailableColor; 513 return web_view_ ? title_color_ : kDefaultUnavailableColor;
510 } 514 }
511 515
512 base::string16 WebActivity::GetTitle() const { 516 base::string16 WebActivity::GetTitle() const {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 637
634 void WebActivity::ReloadAndObserve() { 638 void WebActivity::ReloadAndObserve() {
635 if (web_view_->IsContentEvicted()) { 639 if (web_view_->IsContentEvicted()) {
636 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_); 640 DCHECK_EQ(ACTIVITY_UNLOADED, current_state_);
637 web_view_->ReloadContent(); 641 web_view_->ReloadContent();
638 } 642 }
639 Observe(web_view_->GetWebContents()); 643 Observe(web_view_->GetWebContents());
640 } 644 }
641 645
642 } // namespace athena 646 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/web_activity.h ('k') | athena/test/sample_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698