15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file.
45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "extensions/shell/browser/shell_app_window_client.h"
65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <vector>
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "extensions/browser/app_window/app_window.h"
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "extensions/shell/browser/desktop_controller.h"
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "extensions/shell/browser/shell_native_app_window.h"
12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace extensions {
145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)ShellAppWindowClient::ShellAppWindowClient() {
165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)ShellAppWindowClient::~ShellAppWindowClient() {
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)AppWindow* ShellAppWindowClient::CreateAppWindow(
225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    content::BrowserContext* context,
235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const Extension* extension) {
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return DesktopController::instance()->CreateAppWindow(context, extension);
255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)NativeAppWindow* ShellAppWindowClient::CreateNativeAppWindow(
285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      AppWindow* window,
295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const AppWindow::CreateParams& params) {
305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  ShellNativeAppWindow* native_app_window =
315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      new ShellNativeAppWindow(window, params);
325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  DesktopController::instance()->AddAppWindow(
335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      native_app_window->GetNativeWindow());
345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return native_app_window;
355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void ShellAppWindowClient::OpenDevToolsWindow(
385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    content::WebContents* web_contents,
395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const base::Closure& callback) {
405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  NOTIMPLEMENTED();
415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool ShellAppWindowClient::IsCurrentChannelOlderThanDev() {
445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  return false;
455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}
465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}  // namespace extensions
485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)