| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_ | 5 #ifndef CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_ |
| 6 #define CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_ | 6 #define CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "content/port/browser/render_view_host_delegate_view.h" | 10 #include "content/port/browser/render_view_host_delegate_view.h" |
| 11 #include "content/public/browser/web_contents_view.h" | 11 #include "content/public/browser/web_contents_view.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class TestWebContentsView : public WebContentsView, | 15 class TestWebContentsView : public WebContentsView, |
| 16 public RenderViewHostDelegateView { | 16 public RenderViewHostDelegateView { |
| 17 public: | 17 public: |
| 18 TestWebContentsView(); | 18 TestWebContentsView(); |
| 19 virtual ~TestWebContentsView(); | 19 virtual ~TestWebContentsView(); |
| 20 | 20 |
| 21 // RenderViewHostDelegateView: | 21 // RenderViewHostDelegateView: |
| 22 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; | 22 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; |
| 23 virtual void ShowPopupMenu(const gfx::Rect& bounds, |
| 24 int item_height, |
| 25 double item_font_size, |
| 26 int selected_item, |
| 27 const std::vector<WebMenuItem>& items, |
| 28 bool right_aligned, |
| 29 bool allow_multiple_selection) OVERRIDE; |
| 23 virtual void StartDragging(const WebDropData& drop_data, | 30 virtual void StartDragging(const WebDropData& drop_data, |
| 24 WebKit::WebDragOperationsMask allowed_ops, | 31 WebKit::WebDragOperationsMask allowed_ops, |
| 25 const SkBitmap& image, | 32 const SkBitmap& image, |
| 26 const gfx::Point& image_offset) OVERRIDE; | 33 const gfx::Point& image_offset) OVERRIDE; |
| 27 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; | 34 virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; |
| 28 virtual void GotFocus() OVERRIDE; | 35 virtual void GotFocus() OVERRIDE; |
| 29 virtual void TakeFocus(bool reverse) OVERRIDE; | 36 virtual void TakeFocus(bool reverse) OVERRIDE; |
| 30 | 37 |
| 31 // WebContentsView: | 38 // WebContentsView: |
| 32 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; | 39 virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 52 virtual void CloseTabAfterEventTracking() OVERRIDE; | 59 virtual void CloseTabAfterEventTracking() OVERRIDE; |
| 53 virtual void GetViewBounds(gfx::Rect* out) const OVERRIDE; | 60 virtual void GetViewBounds(gfx::Rect* out) const OVERRIDE; |
| 54 | 61 |
| 55 private: | 62 private: |
| 56 DISALLOW_COPY_AND_ASSIGN(TestWebContentsView); | 63 DISALLOW_COPY_AND_ASSIGN(TestWebContentsView); |
| 57 }; | 64 }; |
| 58 | 65 |
| 59 } // namespace content | 66 } // namespace content |
| 60 | 67 |
| 61 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_ | 68 #endif // CONTENT_TEST_TEST_WEB_CONTENTS_VIEW_H_ |
| OLD | NEW |