| Index: chrome/browser/ui/exclusive_access/exclusive_access_context_browser.cc
|
| diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_context_browser.cc b/chrome/browser/ui/exclusive_access/exclusive_access_context_browser.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e43328fb29891e7745f3fc6bd9a8a85f30d6e05a
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/exclusive_access/exclusive_access_context_browser.cc
|
| @@ -0,0 +1,96 @@
|
| +// Copyright (c) 2015 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 "chrome/browser/ui/exclusive_access/exclusive_access_context_browser.h"
|
| +
|
| +#include "chrome/browser/download/download_shelf.h"
|
| +#include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/browser_window.h"
|
| +#include "chrome/browser/ui/status_bubble.h"
|
| +#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| +#include "content/public/browser/web_contents.h"
|
| +
|
| +using content::WebContents;
|
| +
|
| +ExclusiveAccessContextBrowser::ExclusiveAccessContextBrowser(Browser* browser)
|
| + : browser_(browser) {
|
| +}
|
| +
|
| +ExclusiveAccessContextBrowser::~ExclusiveAccessContextBrowser() {
|
| +}
|
| +
|
| +Profile* ExclusiveAccessContextBrowser::GetProfile() {
|
| + return browser_->profile();
|
| +}
|
| +
|
| +bool ExclusiveAccessContextBrowser::IsFullscreen() const {
|
| + return browser_->window()->IsFullscreen();
|
| +}
|
| +
|
| +bool ExclusiveAccessContextBrowser::IsFullscreenWithToolbar() {
|
| + return browser_->window()->IsFullscreenWithToolbar();
|
| +}
|
| +
|
| +bool ExclusiveAccessContextBrowser::SupportsFullscreenWithToolbar() {
|
| + return browser_->window()->SupportsFullscreenWithToolbar();
|
| +}
|
| +
|
| +void ExclusiveAccessContextBrowser::EnterFullscreen(
|
| + const GURL& url,
|
| + ExclusiveAccessBubbleType bubble_type,
|
| + bool with_toolbar) {
|
| + browser_->window()->EnterFullscreen(url, bubble_type, with_toolbar);
|
| +}
|
| +
|
| +void ExclusiveAccessContextBrowser::ExitFullscreen() {
|
| + browser_->window()->ExitFullscreen();
|
| +}
|
| +
|
| +void ExclusiveAccessContextBrowser::UpdateExclusiveAccessExitBubbleContent(
|
| + GURL url,
|
| + ExclusiveAccessBubbleType bubble_type) {
|
| + browser_->window()->UpdateFullscreenExitBubbleContent(url, bubble_type);
|
| +}
|
| +
|
| +WebContents* ExclusiveAccessContextBrowser::GetActiveWebContents() {
|
| + return browser_->tab_strip_model()->GetActiveWebContents();
|
| +}
|
| +
|
| +void ExclusiveAccessContextBrowser::UpdateFullscreenWithToolbar(
|
| + bool with_toolbar) {
|
| + return browser_->window()->UpdateFullscreenWithToolbar(with_toolbar);
|
| +}
|
| +
|
| +void ExclusiveAccessContextBrowser::SetMetroSnapMode(bool enable) {
|
| +#if defined(OS_WIN)
|
| + browser_->window()->SetMetroSnapMode(enable);
|
| +#endif
|
| +}
|
| +
|
| +bool ExclusiveAccessContextBrowser::IsInMetroSnapMode() {
|
| +#if defined(OS_WIN)
|
| + return browser_->window()->IsInMetroSnapMode();
|
| +#else
|
| + return false;
|
| +#endif
|
| +}
|
| +
|
| +void ExclusiveAccessContextBrowser::UpdateDownloadShelf(bool unhide) {
|
| + BrowserWindow* const window = browser_->window();
|
| + if (unhide) {
|
| + window->GetDownloadShelf()->Unhide();
|
| + } else {
|
| + window->GetDownloadShelf()->Hide();
|
| + if (window->GetStatusBubble())
|
| + window->GetStatusBubble()->Hide();
|
| + }
|
| +}
|
| +
|
| +bool ExclusiveAccessContextBrowser::UseCallbackForMouseLock() {
|
| + return false;
|
| +}
|
| +
|
| +bool ExclusiveAccessContextBrowser::MouseLockCallback(bool acquired) {
|
| + return false;
|
| +}
|
|
|