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

Unified Diff: chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm

Issue 10825240: Refactor ShellWindow to separate platform-specific code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 4 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/extensions/shell_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm
index dcb1253669b3116667461e1f340ffb18b438861f..b0f73d767a18c72eaf872be3944ae12ed55c828b 100644
--- a/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm
@@ -121,11 +121,9 @@
- (void)setMouseDownCanMoveWindow:(BOOL)can_move;
@end
-ShellWindowCocoa::ShellWindowCocoa(Profile* profile,
- const extensions::Extension* extension,
- const GURL& url,
+ShellWindowCocoa::ShellWindowCocoa(ShellWindow* shell_window,
const ShellWindow::CreateParams& params)
- : ShellWindow(profile, extension, url),
+ : shell_window_(shell_window),
has_frame_(params.frame == ShellWindow::CreateParams::FRAME_CHROME),
attention_request_id_(0) {
// Flip coordinates based on the primary screen.
@@ -141,7 +139,7 @@ ShellWindowCocoa::ShellWindowCocoa(Profile* profile,
styleMask:style_mask
backing:NSBackingStoreBuffered
defer:NO]);
- [window setTitle:base::SysUTF8ToNSString(extension->name())];
+ [window setTitle:base::SysUTF8ToNSString(extension()->name())];
gfx::Size min_size = params.minimum_size;
if (min_size.width() || min_size.height()) {
[window setContentMinSize:NSMakeSize(min_size.width(), min_size.height())];
@@ -353,6 +351,10 @@ void ShellWindowCocoa::SetBounds(const gfx::Rect& bounds) {
[window() setFrame:cocoa_bounds display:YES];
}
+void ShellWindowCocoa::UpdateWindowTitle() {
+ // TODO(jeremya): implement.
+}
+
void ShellWindowCocoa::UpdateDraggableRegions(
const std::vector<extensions::DraggableRegion>& regions) {
// Draggable region is not supported for non-frameless window.
@@ -412,7 +414,7 @@ bool ShellWindowCocoa::IsAlwaysOnTop() const {
void ShellWindowCocoa::WindowWillClose() {
[window_controller_ setShellWindow:NULL];
- OnNativeClose();
+ shell_window_->OnNativeClose();
}
void ShellWindowCocoa::WindowDidBecomeKey() {
@@ -444,9 +446,7 @@ NSWindow* ShellWindowCocoa::window() const {
}
// static
-ShellWindow* ShellWindow::CreateImpl(Profile* profile,
- const extensions::Extension* extension,
- const GURL& url,
- const ShellWindow::CreateParams& params) {
- return new ShellWindowCocoa(profile, extension, url, params);
+NativeShellWindow* NativeShellWindow::Create(
+ ShellWindow* shell_window, const ShellWindow::CreateParams& params) {
+ return new ShellWindowCocoa(shell_window, params);
}
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/shell_window_cocoa.h ('k') | chrome/browser/ui/extensions/native_shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698