Commit cb9416ec authored by hashimoto's avatar hashimoto Committed by Commit bot

Add ShellAppsClient, ShellAppDelegate, ShellNativeAppWindow

BUG=387288

Review URL: https://codereview.chromium.org/547593002

Cr-Commit-Position: refs/heads/master@{#293666}
parent 6cdfc247
...@@ -64,6 +64,11 @@ class AthenaDesktopController : public extensions::DesktopController { ...@@ -64,6 +64,11 @@ class AthenaDesktopController : public extensions::DesktopController {
return app_window; return app_window;
} }
// Adds the window to the desktop.
virtual void AddAppWindow(aura::Window* window) OVERRIDE {
NOTIMPLEMENTED();
}
// Closes and destroys the app windows. // Closes and destroys the app windows.
virtual void CloseAppWindows() OVERRIDE {} virtual void CloseAppWindows() OVERRIDE {}
......
...@@ -56,11 +56,15 @@ ...@@ -56,11 +56,15 @@
'browser/desktop_controller.h', 'browser/desktop_controller.h',
'browser/media_capture_util.cc', 'browser/media_capture_util.cc',
'browser/media_capture_util.h', 'browser/media_capture_util.h',
'browser/shell_app_delegate.cc',
'browser/shell_app_delegate.h',
'browser/shell_app_sorting.cc', 'browser/shell_app_sorting.cc',
'browser/shell_app_sorting.h', 'browser/shell_app_sorting.h',
'browser/shell_app_window.cc', 'browser/shell_app_window.cc',
'browser/shell_app_window.h', 'browser/shell_app_window.h',
'browser/shell_app_window_controller.h', 'browser/shell_app_window_controller.h',
'browser/shell_apps_client.cc',
'browser/shell_apps_client.h',
'browser/shell_audio_controller_chromeos.cc', 'browser/shell_audio_controller_chromeos.cc',
'browser/shell_audio_controller_chromeos.h', 'browser/shell_audio_controller_chromeos.h',
'browser/shell_browser_context.cc', 'browser/shell_browser_context.cc',
...@@ -86,6 +90,8 @@ ...@@ -86,6 +90,8 @@
'browser/shell_extension_web_contents_observer.h', 'browser/shell_extension_web_contents_observer.h',
'browser/shell_extensions_browser_client.cc', 'browser/shell_extensions_browser_client.cc',
'browser/shell_extensions_browser_client.h', 'browser/shell_extensions_browser_client.h',
'browser/shell_native_app_window.cc',
'browser/shell_native_app_window.h',
'browser/shell_network_controller_chromeos.cc', 'browser/shell_network_controller_chromeos.cc',
'browser/shell_network_controller_chromeos.h', 'browser/shell_network_controller_chromeos.h',
'browser/shell_omaha_query_params_delegate.cc', 'browser/shell_omaha_query_params_delegate.cc',
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_ #define EXTENSIONS_SHELL_BROWSER_DESKTOP_CONTROLLER_H_
namespace aura { namespace aura {
class Window;
class WindowTreeHost; class WindowTreeHost;
} }
...@@ -40,6 +41,9 @@ class DesktopController { ...@@ -40,6 +41,9 @@ class DesktopController {
virtual ShellAppWindow* CreateAppWindow(content::BrowserContext* context, virtual ShellAppWindow* CreateAppWindow(content::BrowserContext* context,
const Extension* extension) = 0; const Extension* extension) = 0;
// Attaches the window to our window hierarchy.
virtual void AddAppWindow(aura::Window* window) = 0;
// Closes and destroys the app windows. // Closes and destroys the app windows.
virtual void CloseAppWindows() = 0; virtual void CloseAppWindows() = 0;
}; };
......
// Copyright 2014 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 "extensions/shell/browser/shell_app_delegate.h"
#include "extensions/common/constants.h"
#include "extensions/shell/browser/media_capture_util.h"
namespace extensions {
ShellAppDelegate::ShellAppDelegate() {
}
ShellAppDelegate::~ShellAppDelegate() {
}
void ShellAppDelegate::InitWebContents(content::WebContents* web_contents) {
}
void ShellAppDelegate::ResizeWebContents(content::WebContents* web_contents,
const gfx::Size& size) {
NOTIMPLEMENTED();
}
content::WebContents* ShellAppDelegate::OpenURLFromTab(
content::BrowserContext* context,
content::WebContents* source,
const content::OpenURLParams& params) {
NOTIMPLEMENTED();
return NULL;
}
void ShellAppDelegate::AddNewContents(content::BrowserContext* context,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture,
bool* was_blocked) {
NOTIMPLEMENTED();
}
content::ColorChooser* ShellAppDelegate::ShowColorChooser(
content::WebContents* web_contents,
SkColor initial_color) {
NOTIMPLEMENTED();
return NULL;
}
void ShellAppDelegate::RunFileChooser(
content::WebContents* tab,
const content::FileChooserParams& params) {
NOTIMPLEMENTED();
}
void ShellAppDelegate::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback,
const extensions::Extension* extension) {
media_capture_util::GrantMediaStreamRequest(
web_contents, request, callback, extension);
}
int ShellAppDelegate::PreferredIconSize() {
return extension_misc::EXTENSION_ICON_SMALL;
}
gfx::ImageSkia ShellAppDelegate::GetAppDefaultIcon() {
NOTIMPLEMENTED();
return gfx::ImageSkia();
}
void ShellAppDelegate::SetWebContentsBlocked(
content::WebContents* web_contents,
bool blocked) {
NOTIMPLEMENTED();
}
bool ShellAppDelegate::IsWebContentsVisible(
content::WebContents* web_contents) {
return true;
}
void ShellAppDelegate::SetTerminatingCallback(const base::Closure& callback) {
NOTIMPLEMENTED();
}
} // namespace extensions
// Copyright 2014 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.
#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_
#define EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_
#include "extensions/browser/app_window/app_delegate.h"
namespace extensions {
// app_shell's AppDelegate implementation.
class ShellAppDelegate : public AppDelegate {
public:
ShellAppDelegate();
virtual ~ShellAppDelegate();
// AppDelegate overrides:
virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE;
virtual void ResizeWebContents(content::WebContents* web_contents,
const gfx::Size& size) OVERRIDE;
virtual content::WebContents* OpenURLFromTab(
content::BrowserContext* context,
content::WebContents* source,
const content::OpenURLParams& params) OVERRIDE;
virtual void AddNewContents(content::BrowserContext* context,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture,
bool* was_blocked) OVERRIDE;
virtual content::ColorChooser* ShowColorChooser(
content::WebContents* web_contents,
SkColor initial_color) OVERRIDE;
virtual void RunFileChooser(
content::WebContents* tab,
const content::FileChooserParams& params) OVERRIDE;
virtual void RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback,
const Extension* extension) OVERRIDE;
virtual int PreferredIconSize() OVERRIDE;
virtual gfx::ImageSkia GetAppDefaultIcon() OVERRIDE;
virtual void SetWebContentsBlocked(content::WebContents* web_contents,
bool blocked) OVERRIDE;
virtual bool IsWebContentsVisible(
content::WebContents* web_contents) OVERRIDE;
virtual void SetTerminatingCallback(const base::Closure& callback) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(ShellAppDelegate);
};
} // namespace extensions
#endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_
// Copyright 2014 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 "extensions/shell/browser/shell_apps_client.h"
#include "extensions/browser/app_window/app_window.h"
#include "extensions/shell/browser/desktop_controller.h"
#include "extensions/shell/browser/shell_app_delegate.h"
#include "extensions/shell/browser/shell_native_app_window.h"
namespace extensions {
ShellAppsClient::ShellAppsClient() {
}
ShellAppsClient::~ShellAppsClient() {
}
std::vector<content::BrowserContext*>
ShellAppsClient::GetLoadedBrowserContexts() {
NOTIMPLEMENTED();
return std::vector<content::BrowserContext*>();
}
AppWindow* ShellAppsClient::CreateAppWindow(content::BrowserContext* context,
const Extension* extension) {
return new AppWindow(context, new ShellAppDelegate, extension);
}
NativeAppWindow* ShellAppsClient::CreateNativeAppWindow(
AppWindow* window,
const AppWindow::CreateParams& params) {
ShellNativeAppWindow* native_app_window =
new ShellNativeAppWindow(window, params);
DesktopController::instance()->AddAppWindow(
native_app_window->GetNativeWindow());
return native_app_window;
}
void ShellAppsClient::IncrementKeepAliveCount() {
NOTIMPLEMENTED();
}
void ShellAppsClient::DecrementKeepAliveCount() {
NOTIMPLEMENTED();
}
void ShellAppsClient::OpenDevToolsWindow(content::WebContents* web_contents,
const base::Closure& callback) {
NOTIMPLEMENTED();
}
bool ShellAppsClient::IsCurrentChannelOlderThanDev() {
return false;
}
} // namespace extensions
// Copyright 2014 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.
#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
#define EXTENSIONS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "extensions/browser/app_window/apps_client.h"
namespace extensions {
// app_shell's AppsClient implementation.
class ShellAppsClient : public AppsClient {
public:
ShellAppsClient();
virtual ~ShellAppsClient();
// AppsClient overrides:
virtual std::vector<content::BrowserContext*> GetLoadedBrowserContexts()
OVERRIDE;
virtual AppWindow* CreateAppWindow(content::BrowserContext* context,
const Extension* extension) OVERRIDE;
virtual NativeAppWindow* CreateNativeAppWindow(
AppWindow* window,
const AppWindow::CreateParams& params) OVERRIDE;
virtual void IncrementKeepAliveCount() OVERRIDE;
virtual void DecrementKeepAliveCount() OVERRIDE;
virtual void OpenDevToolsWindow(content::WebContents* web_contents,
const base::Closure& callback) OVERRIDE;
virtual bool IsCurrentChannelOlderThanDev() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(ShellAppsClient);
};
} // namespace extensions
#endif // EXTENSIONS_SHELL_BROWSER_SHELL_APPS_CLIENT_H_
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "content/shell/browser/shell_net_log.h" #include "content/shell/browser/shell_net_log.h"
#include "extensions/browser/browser_context_keyed_service_factories.h" #include "extensions/browser/browser_context_keyed_service_factories.h"
#include "extensions/browser/extension_system.h" #include "extensions/browser/extension_system.h"
#include "extensions/shell/browser/shell_apps_client.h"
#include "extensions/shell/browser/shell_browser_context.h" #include "extensions/shell/browser/shell_browser_context.h"
#include "extensions/shell/browser/shell_browser_main_delegate.h" #include "extensions/shell/browser/shell_browser_main_delegate.h"
#include "extensions/shell/browser/shell_desktop_controller.h" #include "extensions/shell/browser/shell_desktop_controller.h"
...@@ -117,6 +118,9 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() { ...@@ -117,6 +118,9 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
device_client_.reset(new ShellDeviceClient); device_client_.reset(new ShellDeviceClient);
apps_client_.reset(new ShellAppsClient());
extensions::AppsClient::Set(apps_client_.get());
extensions_client_.reset(new ShellExtensionsClient()); extensions_client_.reset(new ShellExtensionsClient());
ExtensionsClient::Set(extensions_client_.get()); ExtensionsClient::Set(extensions_client_.get());
......
...@@ -28,6 +28,7 @@ class NetLog; ...@@ -28,6 +28,7 @@ class NetLog;
namespace extensions { namespace extensions {
class DesktopController; class DesktopController;
class ShellAppsClient;
class ShellBrowserContext; class ShellBrowserContext;
class ShellBrowserMainDelegate; class ShellBrowserMainDelegate;
class ShellDeviceClient; class ShellDeviceClient;
...@@ -73,6 +74,7 @@ class ShellBrowserMainParts : public content::BrowserMainParts { ...@@ -73,6 +74,7 @@ class ShellBrowserMainParts : public content::BrowserMainParts {
scoped_ptr<DesktopController> desktop_controller_; scoped_ptr<DesktopController> desktop_controller_;
scoped_ptr<ShellBrowserContext> browser_context_; scoped_ptr<ShellBrowserContext> browser_context_;
scoped_ptr<ShellDeviceClient> device_client_; scoped_ptr<ShellDeviceClient> device_client_;
scoped_ptr<ShellAppsClient> apps_client_;
scoped_ptr<ShellExtensionsClient> extensions_client_; scoped_ptr<ShellExtensionsClient> extensions_client_;
scoped_ptr<ShellExtensionsBrowserClient> extensions_browser_client_; scoped_ptr<ShellExtensionsBrowserClient> extensions_browser_client_;
scoped_ptr<net::NetLog> net_log_; scoped_ptr<net::NetLog> net_log_;
......
...@@ -189,12 +189,17 @@ ShellAppWindow* ShellDesktopController::CreateAppWindow( ...@@ -189,12 +189,17 @@ ShellAppWindow* ShellDesktopController::CreateAppWindow(
// Attach the web contents view to our window hierarchy. // Attach the web contents view to our window hierarchy.
aura::Window* content = app_window_->GetNativeWindow(); aura::Window* content = app_window_->GetNativeWindow();
root_window->AddChild(content); AddAppWindow(content);
content->Show(); content->Show();
return app_window_.get(); return app_window_.get();
} }
void ShellDesktopController::AddAppWindow(aura::Window* window) {
aura::Window* root_window = GetHost()->window();
root_window->AddChild(window);
}
void ShellDesktopController::CloseAppWindows() { void ShellDesktopController::CloseAppWindows() {
app_window_.reset(); app_window_.reset();
} }
......
...@@ -70,6 +70,7 @@ class ShellDesktopController : public DesktopController, ...@@ -70,6 +70,7 @@ class ShellDesktopController : public DesktopController,
virtual aura::WindowTreeHost* GetHost() OVERRIDE; virtual aura::WindowTreeHost* GetHost() OVERRIDE;
virtual ShellAppWindow* CreateAppWindow(content::BrowserContext* context, virtual ShellAppWindow* CreateAppWindow(content::BrowserContext* context,
const Extension* extension) OVERRIDE; const Extension* extension) OVERRIDE;
virtual void AddAppWindow(aura::Window* window) OVERRIDE;
virtual void CloseAppWindows() OVERRIDE; virtual void CloseAppWindows() OVERRIDE;
// aura::client::WindowTreeClient overrides: // aura::client::WindowTreeClient overrides:
......
// Copyright 2014 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 "extensions/shell/browser/shell_native_app_window.h"
#include "content/public/browser/web_contents.h"
#include "ui/aura/window.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace extensions {
ShellNativeAppWindow::ShellNativeAppWindow(
AppWindow* app_window,
const AppWindow::CreateParams& params)
: app_window_(app_window) {
gfx::Rect bounds = params.GetInitialWindowBounds(GetFrameInsets());
bool position_specified =
bounds.x() != AppWindow::BoundsSpecification::kUnspecifiedPosition &&
bounds.y() != AppWindow::BoundsSpecification::kUnspecifiedPosition;
if (!position_specified)
bounds.set_origin(GetBounds().origin());
SetBounds(bounds);
}
ShellNativeAppWindow::~ShellNativeAppWindow() {
}
bool ShellNativeAppWindow::IsActive() const {
NOTIMPLEMENTED();
return false;
}
bool ShellNativeAppWindow::IsMaximized() const {
NOTIMPLEMENTED();
return false;
}
bool ShellNativeAppWindow::IsMinimized() const {
NOTIMPLEMENTED();
return false;
}
bool ShellNativeAppWindow::IsFullscreen() const {
NOTIMPLEMENTED();
return false;
}
gfx::NativeWindow ShellNativeAppWindow::GetNativeWindow() {
return GetWindow();
}
gfx::Rect ShellNativeAppWindow::GetRestoredBounds() const {
NOTIMPLEMENTED();
return GetBounds();
}
ui::WindowShowState ShellNativeAppWindow::GetRestoredState() const {
NOTIMPLEMENTED();
return ui::SHOW_STATE_NORMAL;
}
gfx::Rect ShellNativeAppWindow::GetBounds() const {
return GetWindow()->GetBoundsInScreen();
}
void ShellNativeAppWindow::Show() {
GetWindow()->Show();
}
void ShellNativeAppWindow::Hide() {
GetWindow()->Hide();
}
void ShellNativeAppWindow::ShowInactive() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Close() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Activate() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Deactivate() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Maximize() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Minimize() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Restore() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::SetBounds(const gfx::Rect& bounds) {
GetWindow()->SetBounds(bounds);
}
void ShellNativeAppWindow::FlashFrame(bool flash) {
NOTIMPLEMENTED();
}
bool ShellNativeAppWindow::IsAlwaysOnTop() const {
NOTIMPLEMENTED();
return false;
}
void ShellNativeAppWindow::SetAlwaysOnTop(bool always_on_top) {
NOTIMPLEMENTED();
}
gfx::NativeView ShellNativeAppWindow::GetHostView() const {
NOTIMPLEMENTED();
return NULL;
}
gfx::Point ShellNativeAppWindow::GetDialogPosition(const gfx::Size& size) {
NOTIMPLEMENTED();
return gfx::Point();
}
void ShellNativeAppWindow::AddObserver(
web_modal::ModalDialogHostObserver* observer) {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::RemoveObserver(
web_modal::ModalDialogHostObserver* observer) {
NOTIMPLEMENTED();
}
gfx::Size ShellNativeAppWindow::GetMaximumDialogSize() {
NOTIMPLEMENTED();
return gfx::Size();
}
void ShellNativeAppWindow::SetFullscreen(int fullscreen_types) {
NOTIMPLEMENTED();
}
bool ShellNativeAppWindow::IsFullscreenOrPending() const {
NOTIMPLEMENTED();
return false;
}
void ShellNativeAppWindow::UpdateWindowIcon() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::UpdateWindowTitle() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::UpdateBadgeIcon() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) {
NOTIMPLEMENTED();
}
SkRegion* ShellNativeAppWindow::GetDraggableRegion() {
NOTIMPLEMENTED();
return NULL;
}
void ShellNativeAppWindow::UpdateShape(scoped_ptr<SkRegion> region) {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
NOTIMPLEMENTED();
}
bool ShellNativeAppWindow::IsFrameless() const {
NOTIMPLEMENTED();
return false;
}
bool ShellNativeAppWindow::HasFrameColor() const {
NOTIMPLEMENTED();
return false;
}
SkColor ShellNativeAppWindow::ActiveFrameColor() const {
NOTIMPLEMENTED();
return SkColor();
}
SkColor ShellNativeAppWindow::InactiveFrameColor() const {
NOTIMPLEMENTED();
return SkColor();
}
gfx::Insets ShellNativeAppWindow::GetFrameInsets() const {
NOTIMPLEMENTED();
return gfx::Insets();
}
void ShellNativeAppWindow::ShowWithApp() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::HideWithApp() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::UpdateShelfMenu() {
NOTIMPLEMENTED();
}
gfx::Size ShellNativeAppWindow::GetContentMinimumSize() const {
NOTIMPLEMENTED();
return gfx::Size();
}
gfx::Size ShellNativeAppWindow::GetContentMaximumSize() const {
NOTIMPLEMENTED();
return gfx::Size();
}
void ShellNativeAppWindow::SetContentSizeConstraints(
const gfx::Size& min_size,
const gfx::Size& max_size) {
NOTIMPLEMENTED();
}
bool ShellNativeAppWindow::CanHaveAlphaEnabled() const {
NOTIMPLEMENTED();
return false;
}
aura::Window* ShellNativeAppWindow::GetWindow() const {
return app_window_->web_contents()->GetNativeView();
}
} // namespace extensions
// Copyright 2014 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.
#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_NATIVE_APP_WINDOW_H_
#define EXTENSIONS_SHELL_BROWSER_SHELL_NATIVE_APP_WINDOW_H_
#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/native_app_window.h"
namespace extensions {
// app_shell's NativeAppWindow implementation.
class ShellNativeAppWindow : public NativeAppWindow {
public:
ShellNativeAppWindow(AppWindow* app_window,
const AppWindow::CreateParams& params);
virtual ~ShellNativeAppWindow();
// ui::BaseView overrides:
virtual bool IsActive() const OVERRIDE;
virtual bool IsMaximized() const OVERRIDE;
virtual bool IsMinimized() const OVERRIDE;
virtual bool IsFullscreen() const OVERRIDE;
virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
virtual ui::WindowShowState GetRestoredState() const OVERRIDE;
virtual gfx::Rect GetBounds() const OVERRIDE;
virtual void Show() OVERRIDE;
virtual void Hide() OVERRIDE;
virtual void ShowInactive() OVERRIDE;
virtual void Close() OVERRIDE;
virtual void Activate() OVERRIDE;
virtual void Deactivate() OVERRIDE;
virtual void Maximize() OVERRIDE;
virtual void Minimize() OVERRIDE;
virtual void Restore() OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
virtual void FlashFrame(bool flash) OVERRIDE;
virtual bool IsAlwaysOnTop() const OVERRIDE;
virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE;
// web_modal::ModalDialogHost overrides:
virtual gfx::NativeView GetHostView() const OVERRIDE;
virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE;
virtual void AddObserver(
web_modal::ModalDialogHostObserver* observer) OVERRIDE;
virtual void RemoveObserver(
web_modal::ModalDialogHostObserver* observer) OVERRIDE;
// web_modal::WebContentsModalDialogHost overrides:
virtual gfx::Size GetMaximumDialogSize() OVERRIDE;
// NativeAppWindow overrides:
virtual void SetFullscreen(int fullscreen_types) OVERRIDE;
virtual bool IsFullscreenOrPending() const OVERRIDE;
virtual void UpdateWindowIcon() OVERRIDE;
virtual void UpdateWindowTitle() OVERRIDE;
virtual void UpdateBadgeIcon() OVERRIDE;
virtual void UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) OVERRIDE;
virtual SkRegion* GetDraggableRegion() OVERRIDE;
virtual void UpdateShape(scoped_ptr<SkRegion> region) OVERRIDE;
virtual void HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) OVERRIDE;
virtual bool IsFrameless() const OVERRIDE;
virtual bool HasFrameColor() const OVERRIDE;
virtual SkColor ActiveFrameColor() const OVERRIDE;
virtual SkColor InactiveFrameColor() const OVERRIDE;
virtual gfx::Insets GetFrameInsets() const OVERRIDE;
virtual void ShowWithApp() OVERRIDE;
virtual void HideWithApp() OVERRIDE;
virtual void UpdateShelfMenu() OVERRIDE;
virtual gfx::Size GetContentMinimumSize() const OVERRIDE;
virtual gfx::Size GetContentMaximumSize() const OVERRIDE;
virtual void SetContentSizeConstraints(const gfx::Size& min_size,
const gfx::Size& max_size) OVERRIDE;
virtual bool CanHaveAlphaEnabled() const OVERRIDE;
private:
aura::Window* GetWindow() const;
AppWindow* app_window_;
DISALLOW_COPY_AND_ASSIGN(ShellNativeAppWindow);
};
} // namespace extensions
#endif // EXTENSIONS_SHELL_BROWSER_SHELL_NATIVE_APP_WINDOW_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment