OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_TEST_TEST_TAB_CONTENTS_VIEW_H_ |
| 6 #define CONTENT_TEST_TEST_TAB_CONTENTS_VIEW_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "content/browser/tab_contents/tab_contents_view.h" |
| 11 |
| 12 class TestTabContentsView : public TabContentsView { |
| 13 public: |
| 14 TestTabContentsView(); |
| 15 virtual ~TestTabContentsView(); |
| 16 |
| 17 // RenderViewHostDelegate::View: |
| 18 virtual void CreateNewWindow( |
| 19 int route_id, |
| 20 const ViewHostMsg_CreateWindow_Params& params) OVERRIDE; |
| 21 virtual void CreateNewWidget(int route_id, |
| 22 WebKit::WebPopupType popup_type) OVERRIDE; |
| 23 virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; |
| 24 virtual void ShowCreatedWindow(int route_id, |
| 25 WindowOpenDisposition disposition, |
| 26 const gfx::Rect& initial_pos, |
| 27 bool user_gesture) OVERRIDE; |
| 28 virtual void ShowCreatedWidget(int route_id, |
| 29 const gfx::Rect& initial_pos) OVERRIDE; |
| 30 virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; |
| 31 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; |
| 32 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
| 33 int item_height, |
| 34 double item_font_size, |
| 35 int selected_item, |
| 36 const std::vector<WebMenuItem>& items, |
| 37 bool right_aligned) OVERRIDE; |
| 38 virtual void StartDragging(const WebDropData& drop_data, |
| 39 WebKit::WebDragOperationsMask allowed_ops, |
| 40 const SkBitmap& image, |
| 41 const gfx::Point& image_offset) OVERRIDE; |
| 42 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; |
| 43 virtual void GotFocus() OVERRIDE; |
| 44 virtual void TakeFocus(bool reverse) OVERRIDE; |
| 45 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; |
| 46 |
| 47 // TabContentsView: |
| 48 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; |
| 49 virtual RenderWidgetHostView* CreateViewForWidget( |
| 50 RenderWidgetHost* render_widget_host) OVERRIDE; |
| 51 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 52 virtual gfx::NativeView GetContentNativeView() const OVERRIDE; |
| 53 virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; |
| 54 virtual void GetContainerBounds(gfx::Rect *out) const OVERRIDE; |
| 55 virtual void SetPageTitle(const std::wstring& title) OVERRIDE; |
| 56 virtual void OnTabCrashed(base::TerminationStatus status, |
| 57 int error_code) OVERRIDE; |
| 58 virtual void SizeContents(const gfx::Size& size) OVERRIDE; |
| 59 virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; |
| 60 virtual void Focus() OVERRIDE; |
| 61 virtual void SetInitialFocus() OVERRIDE; |
| 62 virtual void StoreFocus() OVERRIDE; |
| 63 virtual void RestoreFocus() OVERRIDE; |
| 64 virtual bool IsDoingDrag() const OVERRIDE; |
| 65 virtual void CancelDragAndCloseTab() OVERRIDE; |
| 66 virtual bool IsEventTracking() const OVERRIDE; |
| 67 virtual void CloseTabAfterEventTracking() OVERRIDE; |
| 68 virtual void GetViewBounds(gfx::Rect* out) const OVERRIDE; |
| 69 |
| 70 private: |
| 71 DISALLOW_COPY_AND_ASSIGN(TestTabContentsView); |
| 72 }; |
| 73 |
| 74 #endif // CONTENT_TEST_TEST_TAB_CONTENTS_VIEW_H_ |
OLD | NEW |