11320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Copyright 2014 The Chromium Authors. All rights reserved.
21320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Use of this source code is governed by a BSD-style license that can be
31320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// found in the LICENSE file.
41320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
51320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "athena/extensions/athena_app_window_client_base.h"
61320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
71320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "athena/activity/public/activity_factory.h"
81320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "athena/activity/public/activity_manager.h"
91320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "athena/extensions/athena_native_app_window_views.h"
101320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "extensions/common/extension.h"
111320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
121320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccinamespace athena {
131320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
141320f92c476a1ad9d19dba2a48c72b75566198e9Primiano TucciAthenaAppWindowClientBase::AthenaAppWindowClientBase() {
151320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}
161320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
171320f92c476a1ad9d19dba2a48c72b75566198e9Primiano TucciAthenaAppWindowClientBase::~AthenaAppWindowClientBase() {
181320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}
191320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
201320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciextensions::NativeAppWindow* AthenaAppWindowClientBase::CreateNativeAppWindow(
211320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci    extensions::AppWindow* app_window,
221320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci    const extensions::AppWindow::CreateParams& params) {
231320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  AthenaNativeAppWindowViews* native_window = new AthenaNativeAppWindowViews;
241320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  native_window->Init(app_window, params);
251320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  ActivityFactory::Get()->CreateAppActivity(app_window,
261320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci                                            native_window->GetWebView());
271320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  return native_window;
281320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}
291320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
301320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}  // namespace athena
31