blob: f66bc54ebaf5d8e001f9720289383e102570fff4 [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"
#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 {
static std::unique_ptr<BrowserController> Create(Profile* profile);
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