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

Unified Diff: athena/main/placeholder.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/main/placeholder.h ('k') | athena/main/placeholder_content.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/placeholder.cc
diff --git a/athena/main/placeholder.cc b/athena/main/placeholder.cc
index eb5c3f65c356f0b6126589c2b03e5b477b7f7178..c3c907e3f53ac3dc19459ae2f3e9736817fb3ff4 100644
--- a/athena/main/placeholder.cc
+++ b/athena/main/placeholder.cc
@@ -4,31 +4,25 @@
#include "athena/main/placeholder.h"
+#include "athena/activity/public/activity_factory.h"
+#include "athena/activity/public/activity_manager.h"
#include "athena/screen/public/screen_manager.h"
#include "base/memory/scoped_ptr.h"
-#include "base/strings/utf_string_conversions.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image_skia.h"
-#include "ui/views/background.h"
-#include "ui/views/controls/label.h"
#include "ui/views/painter.h"
-#include "ui/views/widget/widget.h"
-void CreateTestWindows() {
- const int kAppWindowBackgroundColor = 0xFFDDDDDD;
- views::Widget* test_app_widget = new views::Widget;
- // Athena doesn't have frame yet.
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.context = athena::ScreenManager::Get()->GetContext();
- test_app_widget->Init(params);
- views::Label* label = new views::Label;
- label->SetText(base::ASCIIToUTF16("AppWindow"));
- label->set_background(
- views::Background::CreateSolidBackground(kAppWindowBackgroundColor));
- test_app_widget->SetContentsView(label);
- test_app_widget->Show();
+void CreateTestPages(content::BrowserContext* browser_context) {
+ const char* kTestURLs[] = {
+ "http://cyan.bikeshed.com", "https://news.google.com",
+ "http://blue.bikeshed.com", "https://www.google.com",
+ };
+ for (size_t i = 0; i < arraysize(kTestURLs); ++i) {
+ athena::ActivityManager::Get()->AddActivity(
+ athena::ActivityFactory::Get()->CreateWebActivity(browser_context,
+ GURL(kTestURLs[i])));
+ }
}
void SetupBackgroundImage() {
« no previous file with comments | « athena/main/placeholder.h ('k') | athena/main/placeholder_content.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698