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

Unified Diff: athena/main/placeholder_content.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
« no previous file with comments | « athena/main/placeholder_content.h ('k') | athena/main/sample_activity.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/placeholder_content.cc
diff --git a/athena/main/placeholder_content.cc b/athena/main/placeholder_content.cc
new file mode 100644
index 0000000000000000000000000000000000000000..90464b2aea93358a23759a8f4aff497c75f70b91
--- /dev/null
+++ b/athena/main/placeholder_content.cc
@@ -0,0 +1,25 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "athena/main/placeholder_content.h"
+
+#include "athena/activity/public/activity_manager.h"
+#include "athena/main/web_activity.h"
+#include "content/public/browser/web_contents.h"
+
+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::ActivityManager::Get()->AddActivity(new WebActivity(contents));
+ contents->Focus();
+ }
+}
« no previous file with comments | « athena/main/placeholder_content.h ('k') | athena/main/sample_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698