| 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 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 public NotificationObserver { | 48 public NotificationObserver { |
| 49 public: | 49 public: |
| 50 // The corresponding TabContents is passed in the constructor, and manages our | 50 // The corresponding TabContents is passed in the constructor, and manages our |
| 51 // lifetime. This doesn't need to be the case, but is this way currently | 51 // lifetime. This doesn't need to be the case, but is this way currently |
| 52 // because that's what was easiest when they were split. | 52 // because that's what was easiest when they were split. |
| 53 explicit TabContentsViewMac(TabContents* web_contents); | 53 explicit TabContentsViewMac(TabContents* web_contents); |
| 54 virtual ~TabContentsViewMac(); | 54 virtual ~TabContentsViewMac(); |
| 55 | 55 |
| 56 // TabContentsView implementation -------------------------------------------- | 56 // TabContentsView implementation -------------------------------------------- |
| 57 | 57 |
| 58 virtual void CreateView(const gfx::Size& initial_size); | 58 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; |
| 59 virtual RenderWidgetHostView* CreateViewForWidget( | 59 virtual RenderWidgetHostView* CreateViewForWidget( |
| 60 RenderWidgetHost* render_widget_host); | 60 RenderWidgetHost* render_widget_host) OVERRIDE; |
| 61 virtual gfx::NativeView GetNativeView() const; | 61 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 62 virtual gfx::NativeView GetContentNativeView() const; | 62 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; |
| 63 virtual gfx::NativeWindow GetTopLevelNativeWindow() const; | 63 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; |
| 64 virtual void GetContainerBounds(gfx::Rect* out) const; | 64 virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; |
| 65 virtual void RenderViewCreated(RenderViewHost* host); | 65 virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; |
| 66 virtual void SetPageTitle(const std::wstring& title); | 66 virtual void SetPageTitle(const std::wstring& title) OVERRIDE; |
| 67 virtual void OnTabCrashed(base::TerminationStatus status, | 67 virtual void OnTabCrashed(base::TerminationStatus status, |
| 68 int error_code); | 68 int error_code) OVERRIDE; |
| 69 virtual void SizeContents(const gfx::Size& size); | 69 virtual void SizeContents(const gfx::Size& size) OVERRIDE; |
| 70 virtual void Focus(); | 70 virtual void Focus() OVERRIDE; |
| 71 virtual void SetInitialFocus(); | 71 virtual void SetInitialFocus() OVERRIDE; |
| 72 virtual void StoreFocus(); | 72 virtual void StoreFocus() OVERRIDE; |
| 73 virtual void RestoreFocus(); | 73 virtual void RestoreFocus() OVERRIDE; |
| 74 virtual void UpdatePreferredSize(const gfx::Size& pref_size); | 74 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; |
| 75 virtual bool IsDoingDrag() const; | 75 virtual bool IsDoingDrag() const OVERRIDE; |
| 76 virtual void CancelDragAndCloseTab(); | 76 virtual void CancelDragAndCloseTab() OVERRIDE; |
| 77 virtual bool IsEventTracking() const; | 77 virtual bool IsEventTracking() const OVERRIDE; |
| 78 virtual void CloseTabAfterEventTracking(); | 78 virtual void CloseTabAfterEventTracking() OVERRIDE; |
| 79 virtual void GetViewBounds(gfx::Rect* out) const; | 79 virtual void GetViewBounds(gfx::Rect* out) const OVERRIDE; |
| 80 | 80 |
| 81 // Backend implementation of RenderViewHostDelegate::View. | 81 // Backend implementation of RenderViewHostDelegate::View. |
| 82 virtual void CreateNewWindow( | 82 virtual void CreateNewWindow( |
| 83 int route_id, | 83 int route_id, |
| 84 const ViewHostMsg_CreateWindow_Params& params); | 84 const ViewHostMsg_CreateWindow_Params& params); |
| 85 virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type); | 85 virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type); |
| 86 virtual void CreateNewFullscreenWidget(int route_id); | 86 virtual void CreateNewFullscreenWidget(int route_id); |
| 87 virtual void ShowCreatedWindow(int route_id, | 87 virtual void ShowCreatedWindow(int route_id, |
| 88 WindowOpenDisposition disposition, | 88 WindowOpenDisposition disposition, |
| 89 const gfx::Rect& initial_pos, | 89 const gfx::Rect& initial_pos, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // The context menu. Callbacks are asynchronous so we need to keep it around. | 142 // The context menu. Callbacks are asynchronous so we need to keep it around. |
| 143 scoped_ptr<RenderViewContextMenuMac> context_menu_; | 143 scoped_ptr<RenderViewContextMenuMac> context_menu_; |
| 144 | 144 |
| 145 // The page content's intrinsic width. | 145 // The page content's intrinsic width. |
| 146 int preferred_width_; | 146 int preferred_width_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); | 148 DISALLOW_COPY_AND_ASSIGN(TabContentsViewMac); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 151 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
| OLD | NEW |