blob: 5670977f4b54bbad19a8e01067b330eb12128ffa [file] [log] [blame]
// Copyright 2019 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 <algorithm>
#include "build/build_config.h"
namespace gfx {
class Size;
#if !defined(OS_ANDROID)
namespace views {
class WebView;
namespace weblayer {
class BrowserObserver;
class Profile;
class NavigationController;
// Represents a browser window that is navigable.
class BrowserController {
// Pass an empty |path| for an in-memory profile.
static std::unique_ptr<BrowserController> Create(
Profile* profile,
const gfx::Size& initial_size);
virtual ~BrowserController() {}
virtual void AddObserver(BrowserObserver* observer) = 0;
virtual void RemoveObserver(BrowserObserver* observer) = 0;
virtual NavigationController* GetNavigationController() = 0;
#if !defined(OS_ANDROID)
// TODO: this isn't a stable API, so use it now for expediency in the C++ API,
// but if we ever want to have backward or forward compatibility in C++ this
// will have to be something else.
virtual void AttachToView(views::WebView* web_view) = 0;
} // namespace weblayer