OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { | 365 gfx::Rect BrowserWindowCocoa::GetRestoredBounds() const { |
366 // Flip coordinates based on the primary screen. | 366 // Flip coordinates based on the primary screen. |
367 NSScreen* screen = [[NSScreen screens] firstObject]; | 367 NSScreen* screen = [[NSScreen screens] firstObject]; |
368 NSRect frame = [controller_ regularWindowFrame]; | 368 NSRect frame = [controller_ regularWindowFrame]; |
369 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame)); | 369 gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame)); |
370 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame)); | 370 bounds.set_y(NSHeight([screen frame]) - NSMaxY(frame)); |
371 return bounds; | 371 return bounds; |
372 } | 372 } |
373 | 373 |
| 374 std::string BrowserWindowCocoa::GetWorkspace() const { |
| 375 return std::string(); |
| 376 } |
| 377 |
374 ui::WindowShowState BrowserWindowCocoa::GetRestoredState() const { | 378 ui::WindowShowState BrowserWindowCocoa::GetRestoredState() const { |
375 if (IsMaximized()) | 379 if (IsMaximized()) |
376 return ui::SHOW_STATE_MAXIMIZED; | 380 return ui::SHOW_STATE_MAXIMIZED; |
377 if (IsMinimized()) | 381 if (IsMinimized()) |
378 return ui::SHOW_STATE_MINIMIZED; | 382 return ui::SHOW_STATE_MINIMIZED; |
379 return ui::SHOW_STATE_NORMAL; | 383 return ui::SHOW_STATE_NORMAL; |
380 } | 384 } |
381 | 385 |
382 gfx::Rect BrowserWindowCocoa::GetBounds() const { | 386 gfx::Rect BrowserWindowCocoa::GetBounds() const { |
383 return GetRestoredBounds(); | 387 return GetRestoredBounds(); |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 844 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
841 return [controller_ exclusiveAccessController]; | 845 return [controller_ exclusiveAccessController]; |
842 } | 846 } |
843 | 847 |
844 void BrowserWindowCocoa::ShowImeWarningBubble( | 848 void BrowserWindowCocoa::ShowImeWarningBubble( |
845 const extensions::Extension* extension, | 849 const extensions::Extension* extension, |
846 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 850 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
847 callback) { | 851 callback) { |
848 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 852 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
849 } | 853 } |
OLD | NEW |