| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |