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

Unified Diff: athena/test/sample_activity.cc

Issue 314303004: Use webview in web activity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « athena/test/sample_activity.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/test/sample_activity.cc
diff --git a/athena/test/sample_activity.cc b/athena/test/sample_activity.cc
index bbdfc374dae4991f3b41fbd2149ff5e956b9fe37..6b3713d61a56b0be386afff789a0ca11a726c2c3 100644
--- a/athena/test/sample_activity.cc
+++ b/athena/test/sample_activity.cc
@@ -4,15 +4,19 @@
#include "athena/test/sample_activity.h"
-#include "ui/aura/window.h"
+#include "ui/views/background.h"
+#include "ui/views/view.h"
namespace athena {
namespace test {
SampleActivity::SampleActivity(SkColor color,
- SkColor content_color,
+ SkColor contents_color,
const std::string& title)
- : color_(color), content_color_(content_color), title_(title) {
+ : color_(color),
+ contents_color_(contents_color),
+ title_(title),
+ contents_view_(NULL) {
}
SampleActivity::~SampleActivity() {
@@ -30,13 +34,13 @@ std::string SampleActivity::GetTitle() {
return title_;
}
-aura::Window* SampleActivity::GetNativeWindow() {
- if (!window_) {
- window_.reset(new aura::Window(NULL));
- window_->Init(aura::WINDOW_LAYER_SOLID_COLOR);
- window_->layer()->SetColor(content_color_);
+views::View* SampleActivity::GetContentsView() {
+ if (!contents_view_) {
+ contents_view_ = new views::View;
+ contents_view_->set_background(
+ views::Background::CreateSolidBackground(contents_color_));
}
- return window_.get();
+ return contents_view_;
}
} // namespace test
« no previous file with comments | « athena/test/sample_activity.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698