Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1053)

Unified Diff: apps/app_window.cc

Issue 436503002: Moved CreateNativeAppWindow from AppWindow::Delegate to AppsClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: apps/app_window.cc
diff --git a/apps/app_window.cc b/apps/app_window.cc
index d3a752b50a806371af09a9cdc081eb47a6f0372d..4b9bc42b19d25104eaf0ca3201c3da105ab8fc5f 100644
--- a/apps/app_window.cc
+++ b/apps/app_window.cc
@@ -11,8 +11,8 @@
#include "apps/app_delegate.h"
#include "apps/app_window_geometry_cache.h"
#include "apps/app_window_registry.h"
-#include "apps/apps_client.h"
#include "apps/size_constraints.h"
+#include "apps/ui/apps_client.h"
#include "apps/ui/native_app_window.h"
#include "apps/ui/web_contents_sizer.h"
#include "base/command_line.h"
@@ -224,21 +224,15 @@ gfx::Size AppWindow::CreateParams::GetWindowMaximumSize(
frame_insets);
}
-// AppWindow::Delegate
-
-AppWindow::Delegate::~Delegate() {}
-
// AppWindow
AppWindow::AppWindow(BrowserContext* context,
AppDelegate* app_delegate,
- Delegate* delegate,
const extensions::Extension* extension)
: browser_context_(context),
extension_id_(extension->id()),
window_type_(WINDOW_TYPE_DEFAULT),
app_delegate_(app_delegate),
- delegate_(delegate),
image_loader_ptr_factory_(this),
fullscreen_types_(FULLSCREEN_TYPE_NONE),
show_on_first_paint_(false),
@@ -289,14 +283,16 @@ void AppWindow::Init(const GURL& url,
requested_transparent_background_ = new_params.transparent_background;
- native_app_window_.reset(delegate_->CreateNativeAppWindow(this, new_params));
+ AppsClient* apps_client = AppsClient::Get();
+ native_app_window_.reset(
+ apps_client->CreateNativeAppWindow(this, new_params));
popup_manager_.reset(
new web_modal::PopupManager(GetWebContentsModalDialogHost()));
popup_manager_->RegisterWith(web_contents);
// Prevent the browser process from shutting down while this window exists.
- AppsClient::Get()->IncrementKeepAliveCount();
+ apps_client->IncrementKeepAliveCount();
UpdateExtensionAppIcon();
AppWindowRegistry::Get(browser_context_)->AddAppWindow(this);

Powered by Google App Engine
This is Rietveld 408576698