| OLD | NEW |
| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "chrome/browser/ui/cocoa/repost_form_warning_mac.h" | 36 #include "chrome/browser/ui/cocoa/repost_form_warning_mac.h" |
| 37 #include "chrome/browser/ui/cocoa/restart_browser.h" | 37 #include "chrome/browser/ui/cocoa/restart_browser.h" |
| 38 #include "chrome/browser/ui/cocoa/status_bubble_mac.h" | 38 #include "chrome/browser/ui/cocoa/status_bubble_mac.h" |
| 39 #include "chrome/browser/ui/cocoa/task_manager_mac.h" | 39 #include "chrome/browser/ui/cocoa/task_manager_mac.h" |
| 40 #import "chrome/browser/ui/cocoa/theme_install_bubble_view.h" | 40 #import "chrome/browser/ui/cocoa/theme_install_bubble_view.h" |
| 41 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 41 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
| 42 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 42 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 43 #include "chrome/common/native_web_keyboard_event.h" | 43 #include "chrome/common/native_web_keyboard_event.h" |
| 44 #include "chrome/common/notification_service.h" | 44 #include "chrome/common/notification_service.h" |
| 45 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
| 46 #include "gfx/rect.h" | |
| 47 #include "grit/chromium_strings.h" | 46 #include "grit/chromium_strings.h" |
| 48 #include "grit/generated_resources.h" | 47 #include "grit/generated_resources.h" |
| 49 #include "ui/base/l10n/l10n_util_mac.h" | 48 #include "ui/base/l10n/l10n_util_mac.h" |
| 49 #include "ui/gfx/rect.h" |
| 50 | 50 |
| 51 BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser, | 51 BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser, |
| 52 BrowserWindowController* controller, | 52 BrowserWindowController* controller, |
| 53 NSWindow* window) | 53 NSWindow* window) |
| 54 : browser_(browser), | 54 : browser_(browser), |
| 55 controller_(controller), | 55 controller_(controller), |
| 56 confirm_close_factory_(browser) { | 56 confirm_close_factory_(browser) { |
| 57 // This pref applies to all windows, so all must watch for it. | 57 // This pref applies to all windows, so all must watch for it. |
| 58 registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, | 58 registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, |
| 59 NotificationService::AllSources()); | 59 NotificationService::AllSources()); |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 627 |
| 628 NSWindow* BrowserWindowCocoa::window() const { | 628 NSWindow* BrowserWindowCocoa::window() const { |
| 629 return [controller_ window]; | 629 return [controller_ window]; |
| 630 } | 630 } |
| 631 | 631 |
| 632 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { | 632 void BrowserWindowCocoa::UpdateSidebarForContents(TabContents* tab_contents) { |
| 633 if (tab_contents == browser_->GetSelectedTabContents()) { | 633 if (tab_contents == browser_->GetSelectedTabContents()) { |
| 634 [controller_ updateSidebarForContents:tab_contents]; | 634 [controller_ updateSidebarForContents:tab_contents]; |
| 635 } | 635 } |
| 636 } | 636 } |
| OLD | NEW |