| Index: extensions/browser/api/app_window/app_window_api.cc
|
| diff --git a/extensions/browser/api/app_window/app_window_api.cc b/extensions/browser/api/app_window/app_window_api.cc
|
| index c0b2401f3e8b7b4b47833df9e53d42f4cf791f44..cd20332b82f656c9d72b8872a3e9479804357c66 100644
|
| --- a/extensions/browser/api/app_window/app_window_api.cc
|
| +++ b/extensions/browser/api/app_window/app_window_api.cc
|
| @@ -19,7 +19,6 @@
|
| #include "extensions/browser/app_window/app_window_client.h"
|
| #include "extensions/browser/app_window/app_window_contents.h"
|
| #include "extensions/browser/app_window/app_window_registry.h"
|
| -#include "extensions/browser/app_window/native_app_window.h"
|
| #include "extensions/browser/extensions_browser_client.h"
|
| #include "extensions/browser/image_util.h"
|
| #include "extensions/common/api/app_window.h"
|
| @@ -97,9 +96,9 @@ bool CheckBoundsConflict(const scoped_ptr<int>& inner_property,
|
| }
|
|
|
| // Copy over the bounds specification properties from the API to the
|
| -// AppWindow::CreateParams.
|
| +// native_app_window::CreateParams.
|
| void CopyBoundsSpec(const app_window::BoundsSpecification* input_spec,
|
| - AppWindow::BoundsSpecification* create_spec) {
|
| + native_app_window::BoundsSpecification* create_spec) {
|
| if (!input_spec)
|
| return;
|
|
|
| @@ -151,7 +150,7 @@ bool AppWindowCreateFunction::RunAsync() {
|
| // TODO(jeremya): figure out a way to pass the opening WebContents through to
|
| // AppWindow::Create so we can set the opener at create time rather than
|
| // with a hack in AppWindowCustomBindings::GetView().
|
| - AppWindow::CreateParams create_params;
|
| + native_app_window::AppWindowCreateParams create_params;
|
| app_window::CreateWindowOptions* options = params->options.get();
|
| if (options) {
|
| if (options->id.get()) {
|
| @@ -210,7 +209,7 @@ bool AppWindowCreateFunction::RunAsync() {
|
| if (!AppWindowClient::Get()->IsCurrentChannelOlderThanDev() ||
|
| extension()->location() == extensions::Manifest::COMPONENT) {
|
| if (options->type == app_window::WINDOW_TYPE_PANEL) {
|
| - create_params.window_type = AppWindow::WINDOW_TYPE_PANEL;
|
| + create_params.window_type = native_app_window::WINDOW_TYPE_PANEL;
|
| }
|
| }
|
|
|
| @@ -233,7 +232,7 @@ bool AppWindowCreateFunction::RunAsync() {
|
| #else
|
| // IME extensions must create window with "ime: true" and "frame: none".
|
| if (!options->ime.get() || !*options->ime.get() ||
|
| - create_params.frame != AppWindow::FRAME_NONE) {
|
| + create_params.frame != native_app_window::FRAME_NONE) {
|
| error_ = app_window_constants::kImeOptionMustBeTrueAndNeedsFrameNone;
|
| return false;
|
| }
|
| @@ -274,7 +273,7 @@ bool AppWindowCreateFunction::RunAsync() {
|
| error_ = app_window_constants::kAlphaEnabledMissingPermission;
|
| return false;
|
| }
|
| - if (create_params.frame != AppWindow::FRAME_NONE) {
|
| + if (create_params.frame != native_app_window::FRAME_NONE) {
|
| error_ = app_window_constants::kAlphaEnabledNeedsFrameNone;
|
| return false;
|
| }
|
| @@ -373,7 +372,7 @@ bool AppWindowCreateFunction::RunAsync() {
|
|
|
| bool AppWindowCreateFunction::GetBoundsSpec(
|
| const app_window::CreateWindowOptions& options,
|
| - AppWindow::CreateParams* params,
|
| + native_app_window::AppWindowCreateParams* params,
|
| std::string* error) {
|
| DCHECK(params);
|
| DCHECK(error);
|
| @@ -434,7 +433,8 @@ bool AppWindowCreateFunction::GetBoundsSpec(
|
| CopyBoundsSpec(outer_bounds, &(params->window_spec));
|
| } else {
|
| // Parse deprecated fields.
|
| - // Due to a bug in NativeAppWindow::GetFrameInsets() on Windows and ChromeOS
|
| + // Due to a bug in Nativenative_app_window::GetFrameInsets() on Windows and
|
| + // ChromeOS
|
| // the bounds set the position of the window and the size of the content.
|
| // This will be preserved as apps may be relying on this behavior.
|
|
|
| @@ -483,7 +483,7 @@ bool AppWindowCreateFunction::GetBoundsSpec(
|
| return true;
|
| }
|
|
|
| -AppWindow::Frame AppWindowCreateFunction::GetFrameFromString(
|
| +native_app_window::Frame AppWindowCreateFunction::GetFrameFromString(
|
| const std::string& frame_string) {
|
| if (frame_string == kHtmlFrameOption &&
|
| (extension()->permissions_data()->HasAPIPermission(
|
| @@ -491,18 +491,18 @@ AppWindow::Frame AppWindowCreateFunction::GetFrameFromString(
|
| CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnableExperimentalExtensionApis))) {
|
| inject_html_titlebar_ = true;
|
| - return AppWindow::FRAME_NONE;
|
| + return native_app_window::FRAME_NONE;
|
| }
|
|
|
| if (frame_string == kNoneFrameOption)
|
| - return AppWindow::FRAME_NONE;
|
| + return native_app_window::FRAME_NONE;
|
|
|
| - return AppWindow::FRAME_CHROME;
|
| + return native_app_window::FRAME_CHROME;
|
| }
|
|
|
| bool AppWindowCreateFunction::GetFrameOptions(
|
| const app_window::CreateWindowOptions& options,
|
| - AppWindow::CreateParams* create_params) {
|
| + native_app_window::AppWindowCreateParams* create_params) {
|
| if (!options.frame)
|
| return true;
|
|
|
| @@ -517,7 +517,7 @@ bool AppWindowCreateFunction::GetFrameOptions(
|
| GetFrameFromString(*options.frame->as_frame_options->type);
|
|
|
| if (options.frame->as_frame_options->color.get()) {
|
| - if (create_params->frame != AppWindow::FRAME_CHROME) {
|
| + if (create_params->frame != native_app_window::FRAME_CHROME) {
|
| error_ = app_window_constants::kColorWithFrameNone;
|
| return false;
|
| }
|
|
|