Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(__OBJC__) | 9 #if defined(__OBJC__) |
| 10 | 10 |
| 11 #import <Cocoa/Cocoa.h> | 11 #import <Cocoa/Cocoa.h> |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/memory/scoped_nsobject.h" | 16 #include "base/memory/scoped_nsobject.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 18 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
| 19 #include "content/browser/tab_contents/tab_contents_view.h" | 19 #include "content/browser/tab_contents/tab_contents_view.h" |
| 20 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
| 21 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
| 22 #include "ui/base/cocoa/base_view.h" | 22 #include "ui/base/cocoa/base_view.h" |
| 23 #include "ui/gfx/size.h" | 23 #include "ui/gfx/size.h" |
| 24 | 24 |
| 25 @class FocusTracker; | 25 @class FocusTracker; |
| 26 class RenderViewContextMenuMac; | 26 class RenderViewContextMenuMac; |
| 27 @class SadTabController; | 27 @class SadTabController; |
| 28 class SkBitmap; | 28 class SkBitmap; |
| 29 class TabContentsViewMac; | 29 class TabContentsViewMac; |
| 30 class WebDragBookmarkHandlerMac; | |
| 30 @class WebDragSource; | 31 @class WebDragSource; |
| 31 @class WebDropTarget; | 32 @class WebDropTarget; |
| 32 namespace gfx { | 33 namespace gfx { |
| 33 class Point; | 34 class Point; |
| 34 } | 35 } |
| 35 | 36 |
| 36 @interface TabContentsViewCocoa : BaseView { | 37 @interface TabContentsViewCocoa : BaseView { |
| 37 @private | 38 @private |
| 38 TabContentsViewMac* tabContentsView_; // WEAK; owns us | 39 TabContentsViewMac* tabContentsView_; // WEAK; owns us |
| 39 scoped_nsobject<WebDragSource> dragSource_; | 40 scoped_nsobject<WebDragSource> dragSource_; |
| 40 scoped_nsobject<WebDropTarget> dropTarget_; | 41 scoped_nsobject<WebDropTarget> dropTarget_; |
| 42 scoped_ptr<WebDragBookmarkHandlerMac> bookmark_handler_; | |
|
jochen (gone - plz use gerrit)
2011/11/01 15:16:07
nit. maybe rename the other variables for consiste
Avi (use Gerrit)
2011/11/01 16:01:06
Actually, this one is named wrong. Fixing.
| |
| 41 } | 43 } |
| 42 | 44 |
| 43 // Expose this, since sometimes one needs both the NSView and the TabContents. | 45 // Expose this, since sometimes one needs both the NSView and the TabContents. |
| 44 - (TabContents*)tabContents; | 46 - (TabContents*)tabContents; |
| 45 @end | 47 @end |
| 46 | 48 |
| 47 // Mac-specific implementation of the TabContentsView. It owns an NSView that | 49 // Mac-specific implementation of the TabContentsView. It owns an NSView that |
| 48 // contains all of the contents of the tab and associated child views. | 50 // contains all of the contents of the tab and associated child views. |
| 49 class TabContentsViewMac : public TabContentsView, | 51 class TabContentsViewMac : public TabContentsView, |
| 50 public content::NotificationObserver { | 52 public content::NotificationObserver { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 | 155 |
| 154 // Functions that may be accessed from non-Objective-C C/C++ code. | 156 // Functions that may be accessed from non-Objective-C C/C++ code. |
| 155 class TabContents; | 157 class TabContents; |
| 156 class TabContentsView; | 158 class TabContentsView; |
| 157 | 159 |
| 158 namespace tab_contents_view_mac { | 160 namespace tab_contents_view_mac { |
| 159 TabContentsView* CreateTabContentsView(TabContents* tab_contents); | 161 TabContentsView* CreateTabContentsView(TabContents* tab_contents); |
| 160 } | 162 } |
| 161 | 163 |
| 162 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 164 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |