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

Side by Side Diff: athena/content/app_activity.cc

Issue 550643002: [Athena] Hack to display favicons for web activities in overview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/public/app_registry.h" 9 #include "athena/content/public/app_registry.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 SkColor AppActivity::GetRepresentativeColor() const { 101 SkColor AppActivity::GetRepresentativeColor() const {
102 // TODO(sad): Compute the color from the favicon. 102 // TODO(sad): Compute the color from the favicon.
103 return SK_ColorGRAY; 103 return SK_ColorGRAY;
104 } 104 }
105 105
106 base::string16 AppActivity::GetTitle() const { 106 base::string16 AppActivity::GetTitle() const {
107 return web_view_->GetWebContents()->GetTitle(); 107 return web_view_->GetWebContents()->GetTitle();
108 } 108 }
109 109
110 gfx::ImageSkia AppActivity::GetIcon() const {
111 return gfx::ImageSkia();
112 }
113
110 bool AppActivity::UsesFrame() const { 114 bool AppActivity::UsesFrame() const {
111 return false; 115 return false;
112 } 116 }
113 117
114 views::View* AppActivity::GetContentsView() { 118 views::View* AppActivity::GetContentsView() {
115 if (!web_view_) { 119 if (!web_view_) {
116 // TODO(oshima): use apps::NativeAppWindowViews 120 // TODO(oshima): use apps::NativeAppWindowViews
117 content::WebContents* web_contents = GetWebContents(); 121 content::WebContents* web_contents = GetWebContents();
118 web_view_ = new views::WebView(web_contents->GetBrowserContext()); 122 web_view_ = new views::WebView(web_contents->GetBrowserContext());
119 web_view_->SetWebContents(web_contents); 123 web_view_->SetWebContents(web_contents);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 overview_mode_image_ = gfx::ImageSkia(); 213 overview_mode_image_ = gfx::ImageSkia();
210 } 214 }
211 // Now we can hide this. 215 // Now we can hide this.
212 // Note: This might have to be done asynchronously after the readback took 216 // Note: This might have to be done asynchronously after the readback took
213 // place. 217 // place.
214 web_view_->SetVisible(false); 218 web_view_->SetVisible(false);
215 web_view_->GetWebContents()->GetNativeView()->Hide(); 219 web_view_->GetWebContents()->GetNativeView()->Hide();
216 } 220 }
217 221
218 } // namespace athena 222 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698