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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 2734123004: add a new set of commands to resize and position windows (Closed)
Patch Set: use browser window to support linux/window/mac Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 #include "base/mac/foundation_util.h"
10 #import "base/mac/sdk_forward_declarations.h" 11 #import "base/mac/sdk_forward_declarations.h"
11 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
12 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
13 #include "base/strings/sys_string_conversions.h" 14 #include "base/strings/sys_string_conversions.h"
14 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
15 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
16 #include "chrome/browser/download/download_shelf.h" 17 #include "chrome/browser/download/download_shelf.h"
17 #include "chrome/browser/extensions/extension_util.h" 18 #include "chrome/browser/extensions/extension_util.h"
18 #include "chrome/browser/extensions/tab_helper.h" 19 #include "chrome/browser/extensions/tab_helper.h"
19 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { 839 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() {
839 return [controller_ exclusiveAccessController]; 840 return [controller_ exclusiveAccessController];
840 } 841 }
841 842
842 void BrowserWindowCocoa::ShowImeWarningBubble( 843 void BrowserWindowCocoa::ShowImeWarningBubble(
843 const extensions::Extension* extension, 844 const extensions::Extension* extension,
844 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& 845 const base::Callback<void(ImeWarningBubblePermissionStatus status)>&
845 callback) { 846 callback) {
846 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; 847 NOTREACHED() << "The IME warning bubble is unsupported on this platform.";
847 } 848 }
849
850 // static
851 BrowserWindow* BrowserWindow::GetBrowserWindowForNativeWindow(
852 gfx::NativeWindow window) {
853 id<NSWindowDelegate> window_delegate = [window delegate];
854 if ([window_delegate respondsToSelector:@selector(browserWindow)]) {
855 BrowserWindowController* controller =
856 base::mac::ObjCCastStrict<BrowserWindowController>(window_delegate);
857 return [controller browserWindow];
858 }
859 return nullptr; // Not created by BrowserWindowCocoa.
860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698