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

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

Issue 8851007: WIP / Do not commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/sys_string_conversions.h" 11 #include "base/sys_string_conversions.h"
12 #include "chrome/app/chrome_command_ids.h" 12 #include "chrome/app/chrome_command_ids.h"
13 #include "chrome/browser/bookmarks/bookmark_utils.h" 13 #include "chrome/browser/bookmarks/bookmark_utils.h"
14 #include "chrome/browser/download/download_shelf.h" 14 #include "chrome/browser/download/download_shelf.h"
15 #include "chrome/browser/prefs/pref_service.h" 15 #include "chrome/browser/prefs/pref_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/sidebar/sidebar_container.h" 17 #include "chrome/browser/sidebar/sidebar_container.h"
18 #include "chrome/browser/sidebar/sidebar_manager.h" 18 #include "chrome/browser/sidebar/sidebar_manager.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/browser/ui/browser_dialogs.h"
20 #include "chrome/browser/ui/browser_list.h" 21 #include "chrome/browser/ui/browser_list.h"
21 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h" 22 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h"
22 #import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h" 23 #import "chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.h"
23 #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h" 24 #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h"
24 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 25 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
25 #import "chrome/browser/ui/cocoa/browser_window_utils.h" 26 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
26 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" 27 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
27 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" 28 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h"
28 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" 29 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h"
29 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" 30 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
30 #import "chrome/browser/ui/cocoa/html_dialog_window_controller.h" 31 #import "chrome/browser/ui/cocoa/html_dialog_window_controller.h"
31 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 32 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
32 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 33 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
33 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h" 34 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h"
34 #include "chrome/browser/ui/cocoa/repost_form_warning_mac.h" 35 #include "chrome/browser/ui/cocoa/tab_modal_dialog_mac.h"
35 #include "chrome/browser/ui/cocoa/restart_browser.h" 36 #include "chrome/browser/ui/cocoa/restart_browser.h"
36 #include "chrome/browser/ui/cocoa/status_bubble_mac.h" 37 #include "chrome/browser/ui/cocoa/status_bubble_mac.h"
37 #include "chrome/browser/ui/cocoa/task_manager_mac.h" 38 #include "chrome/browser/ui/cocoa/task_manager_mac.h"
38 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 39 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
39 #include "chrome/browser/ui/page_info_bubble.h" 40 #include "chrome/browser/ui/page_info_bubble.h"
40 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 41 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
41 #include "chrome/browser/ui/webui/task_manager_dialog.h" 42 #include "chrome/browser/ui/webui/task_manager_dialog.h"
42 #include "chrome/common/chrome_notification_types.h" 43 #include "chrome/common/chrome_notification_types.h"
43 #include "chrome/common/chrome_switches.h" 44 #include "chrome/common/chrome_switches.h"
44 #include "chrome/common/pref_names.h" 45 #include "chrome/common/pref_names.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 427
427 bool BrowserWindowCocoa::IsDownloadShelfVisible() const { 428 bool BrowserWindowCocoa::IsDownloadShelfVisible() const {
428 return [controller_ isDownloadShelfVisible] != NO; 429 return [controller_ isDownloadShelfVisible] != NO;
429 } 430 }
430 431
431 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() { 432 DownloadShelf* BrowserWindowCocoa::GetDownloadShelf() {
432 DownloadShelfController* shelfController = [controller_ downloadShelf]; 433 DownloadShelfController* shelfController = [controller_ downloadShelf];
433 return [shelfController bridge]; 434 return [shelfController bridge];
434 } 435 }
435 436
436 void BrowserWindowCocoa::ShowRepostFormWarningDialog( 437 void BrowserWindowCocoa::ShowTabModalDialog(TabModalDialogDelegate* delegate,
437 TabContents* tab_contents) { 438 TabContents* tab_contents) {
438 RepostFormWarningMac::Create(GetNativeHandle(), tab_contents); 439 browser::ShowTabModalDialog(delegate, GetNativeHandle(), tab_contents);
439 } 440 }
440 441
441 void BrowserWindowCocoa::ShowCollectedCookiesDialog( 442 void BrowserWindowCocoa::ShowCollectedCookiesDialog(
442 TabContentsWrapper* wrapper) { 443 TabContentsWrapper* wrapper) {
443 // Deletes itself on close. 444 // Deletes itself on close.
444 new CollectedCookiesMac(GetNativeHandle(), wrapper); 445 new CollectedCookiesMac(GetNativeHandle(), wrapper);
445 } 446 }
446 447
447 // We allow closing the window here since the real quit decision on Mac is made 448 // We allow closing the window here since the real quit decision on Mac is made
448 // in [AppController quit:]. 449 // in [AppController quit:].
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 AvatarMenuBubbleController* menu = 631 AvatarMenuBubbleController* menu =
631 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ 632 [[AvatarMenuBubbleController alloc] initWithBrowser:browser_
632 anchoredAt:point]; 633 anchoredAt:point];
633 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge]; 634 [[menu bubble] setAlignment:info_bubble::kAlignEdgeToAnchorEdge];
634 [menu showWindow:nil]; 635 [menu showWindow:nil];
635 } 636 }
636 637
637 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() { 638 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton() {
638 [[controller_ avatarButtonController] showAvatarBubble]; 639 [[controller_ avatarButtonController] showAvatarBubble];
639 } 640 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/repost_form_warning_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698