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

Unified Diff: athena/main/placeholder.cc

Issue 302683002: athena: Add the concept of Activity and related managers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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
Index: athena/main/placeholder.cc
diff --git a/athena/main/placeholder.cc b/athena/main/placeholder.cc
index eb5c3f65c356f0b6126589c2b03e5b477b7f7178..52433549d7bc341bfe76b3415187bb1c7d6de2fd 100644
--- a/athena/main/placeholder.cc
+++ b/athena/main/placeholder.cc
@@ -4,9 +4,12 @@
#include "athena/main/placeholder.h"
+#include "athena/main/web_task.h"
#include "athena/screen/public/screen_manager.h"
+#include "athena/task/public/task_manager.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/public/browser/web_contents.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image_skia.h"
@@ -40,3 +43,20 @@ void SetupBackgroundImage() {
athena::ScreenManager::Get()->SetBackgroundImage(
gfx::ImageSkia(canvas.ExtractImageRep()));
}
+
+void CreateTestPages(content::BrowserContext* browser_context) {
+ const char* kTestURLs[] = {
+ "http://cyan.bikeshed.com",
+ "https://www.google.com",
+ };
+ for (size_t i = 0; i < arraysize(kTestURLs); ++i) {
+ content::WebContents::CreateParams params(browser_context);
+ content::WebContents* contents = content::WebContents::Create(params);
+ contents->GetController().LoadURL(GURL(kTestURLs[i]),
+ content::Referrer(),
+ content::PAGE_TRANSITION_TYPED,
+ std::string());
+ athena::TaskManager::Get()->AddTask(new WebTask(contents));
+ contents->Focus();
+ }
+}
« no previous file with comments | « athena/main/placeholder.h ('k') | athena/main/web_task.h » ('j') | athena/task/public/task.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698