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

Unified Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 166573005: Rename apps::ShellWindow to apps::AppWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix more shell and Shell refs 2 Created 6 years, 10 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: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
index 790cb5ffd3845c76888c552c475febd2c0523f55..76bd6aa7e32e7a7dff1b0a7cef27bda40399e4ee 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -38,8 +38,7 @@
// windowWillUseStandardFrame, as the window would not restore back to the
// desired size.
-
-using apps::ShellWindow;
+using apps::AppWindow;
@interface NSWindow (NSPrivateApis)
- (void)setBottomCornerRounded:(BOOL)rounded;
@@ -275,10 +274,10 @@ NSInteger AlwaysOnTopWindowLevel() {
@end
NativeAppWindowCocoa::NativeAppWindowCocoa(
- ShellWindow* shell_window,
- const ShellWindow::CreateParams& params)
- : shell_window_(shell_window),
- has_frame_(params.frame == ShellWindow::FRAME_CHROME),
+ AppWindow* app_window,
+ const AppWindow::CreateParams& params)
+ : app_window_(app_window),
+ has_frame_(params.frame == AppWindow::FRAME_CHROME),
is_hidden_(false),
is_hidden_with_app_(false),
is_maximized_(false),
@@ -318,8 +317,7 @@ NativeAppWindowCocoa::NativeAppWindowCocoa(
window_class = [ShellFramelessNSWindow class];
}
- ShellWindow::SizeConstraints size_constraints =
- shell_window_->size_constraints();
+ AppWindow::SizeConstraints size_constraints = app_window_->size_constraints();
shows_resize_controls_ =
params.resizable && !size_constraints.HasFixedSize();
shows_fullscreen_controls_ =
@@ -365,10 +363,10 @@ NativeAppWindowCocoa::NativeAppWindowCocoa(
UpdateWindowMinMaxSize();
extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryCocoa(
- Profile::FromBrowserContext(shell_window_->browser_context()),
+ Profile::FromBrowserContext(app_window_->browser_context()),
window,
extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
- shell_window));
+ app_window));
}
NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const {
@@ -439,7 +437,7 @@ bool NativeAppWindowCocoa::IsFullscreen() const {
}
void NativeAppWindowCocoa::SetFullscreen(int fullscreen_types) {
- bool fullscreen = (fullscreen_types != ShellWindow::FULLSCREEN_TYPE_NONE);
+ bool fullscreen = (fullscreen_types != AppWindow::FULLSCREEN_TYPE_NONE);
if (fullscreen == is_fullscreen_)
return;
is_fullscreen_ = fullscreen;
@@ -540,7 +538,7 @@ void NativeAppWindowCocoa::Show() {
// If there is a shim to gently request attention, return here. Otherwise
// show the window as usual.
if (apps::ExtensionAppShimHandler::RequestUserAttentionForWindow(
- shell_window_)) {
+ app_window_)) {
return;
}
}
@@ -627,7 +625,7 @@ void NativeAppWindowCocoa::UpdateWindowIcon() {
}
void NativeAppWindowCocoa::UpdateWindowTitle() {
- base::string16 title = shell_window_->GetTitle();
+ base::string16 title = app_window_->GetTitle();
[window() setTitle:base::SysUTF16ToNSString(title)];
}
@@ -766,7 +764,7 @@ void NativeAppWindowCocoa::UpdateDraggableRegionsForCustomDrag(
// Aggregate the draggable areas and non-draggable areas such that hit test
// could be performed easily.
- draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions));
+ draggable_region_.reset(AppWindow::RawDraggableRegionsToSkRegion(regions));
}
void NativeAppWindowCocoa::HandleKeyboardEvent(
@@ -881,8 +879,8 @@ void NativeAppWindowCocoa::RemoveObserver(
void NativeAppWindowCocoa::WindowWillClose() {
[window_controller_ setAppWindow:NULL];
- shell_window_->OnNativeWindowChanged();
- shell_window_->OnNativeClose();
+ app_window_->OnNativeWindowChanged();
+ app_window_->OnNativeClose();
}
void NativeAppWindowCocoa::WindowDidBecomeKey() {
@@ -890,7 +888,7 @@ void NativeAppWindowCocoa::WindowDidBecomeKey() {
web_contents()->GetRenderWidgetHostView();
if (rwhv)
rwhv->SetActive(true);
- shell_window_->OnNativeWindowActivated();
+ app_window_->OnNativeWindowActivated();
web_contents()->GetView()->RestoreFocus();
}
@@ -934,20 +932,20 @@ void NativeAppWindowCocoa::WindowDidFinishResize() {
}
void NativeAppWindowCocoa::WindowDidResize() {
- shell_window_->OnNativeWindowChanged();
+ app_window_->OnNativeWindowChanged();
}
void NativeAppWindowCocoa::WindowDidMove() {
UpdateRestoredBounds();
- shell_window_->OnNativeWindowChanged();
+ app_window_->OnNativeWindowChanged();
}
void NativeAppWindowCocoa::WindowDidMiniaturize() {
- shell_window_->OnNativeWindowChanged();
+ app_window_->OnNativeWindowChanged();
}
void NativeAppWindowCocoa::WindowDidDeminiaturize() {
- shell_window_->OnNativeWindowChanged();
+ app_window_->OnNativeWindowChanged();
}
void NativeAppWindowCocoa::WindowWillZoom() {
@@ -1024,11 +1022,11 @@ void NativeAppWindowCocoa::UpdateRestoredBounds() {
}
void NativeAppWindowCocoa::UpdateWindowMinMaxSize() {
- gfx::Size min_size = shell_window_->size_constraints().GetMinimumSize();
+ gfx::Size min_size = app_window_->size_constraints().GetMinimumSize();
[window() setContentMinSize:NSMakeSize(min_size.width(), min_size.height())];
- gfx::Size max_size = shell_window_->size_constraints().GetMaximumSize();
- const int kUnboundedSize = ShellWindow::SizeConstraints::kUnboundedSize;
+ gfx::Size max_size = app_window_->size_constraints().GetMaximumSize();
+ const int kUnboundedSize = AppWindow::SizeConstraints::kUnboundedSize;
CGFloat max_width = max_size.width() == kUnboundedSize ?
CGFLOAT_MAX : max_size.width();
CGFloat max_height = max_size.height() == kUnboundedSize ?

Powered by Google App Engine
This is Rietveld 408576698