Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: content/public/browser/web_contents_view.h

Issue 18281002: Move WebDropData to content::DropData and split off conversion function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build error. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/process_util.h" 11 #include "base/process_util.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 16
17 struct WebDropData;
18
19 namespace content { 17 namespace content {
18 struct DropData;
20 19
21 // The WebContentsView is an interface that is implemented by the platform- 20 // The WebContentsView is an interface that is implemented by the platform-
22 // dependent web contents views. The WebContents uses this interface to talk to 21 // dependent web contents views. The WebContents uses this interface to talk to
23 // them. 22 // them.
24 class CONTENT_EXPORT WebContentsView { 23 class CONTENT_EXPORT WebContentsView {
25 public: 24 public:
26 virtual ~WebContentsView() {} 25 virtual ~WebContentsView() {}
27 26
28 // Returns the native widget that contains the contents of the tab. 27 // Returns the native widget that contains the contents of the tab.
29 virtual gfx::NativeView GetNativeView() const = 0; 28 virtual gfx::NativeView GetNativeView() const = 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual void SetInitialFocus() = 0; 69 virtual void SetInitialFocus() = 0;
71 70
72 // Stores the currently focused view. 71 // Stores the currently focused view.
73 virtual void StoreFocus() = 0; 72 virtual void StoreFocus() = 0;
74 73
75 // Restores focus to the last focus view. If StoreFocus has not yet been 74 // Restores focus to the last focus view. If StoreFocus has not yet been
76 // invoked, SetInitialFocus is invoked. 75 // invoked, SetInitialFocus is invoked.
77 virtual void RestoreFocus() = 0; 76 virtual void RestoreFocus() = 0;
78 77
79 // Returns the current drop data, if any. 78 // Returns the current drop data, if any.
80 virtual WebDropData* GetDropData() const = 0; 79 virtual DropData* GetDropData() const = 0;
81 80
82 // Get the bounds of the View, relative to the parent. 81 // Get the bounds of the View, relative to the parent.
83 virtual gfx::Rect GetViewBounds() const = 0; 82 virtual gfx::Rect GetViewBounds() const = 0;
84 83
85 #if defined(OS_MACOSX) 84 #if defined(OS_MACOSX)
86 // The web contents view assumes that its view will never be overlapped by 85 // The web contents view assumes that its view will never be overlapped by
87 // another view (either partially or fully). This allows it to perform 86 // another view (either partially or fully). This allows it to perform
88 // optimizations. If the view is in a view hierarchy where it might be 87 // optimizations. If the view is in a view hierarchy where it might be
89 // overlapped by another view, notify the view by calling this with |true|. 88 // overlapped by another view, notify the view by calling this with |true|.
90 virtual void SetAllowOverlappingViews(bool overlapping) = 0; 89 virtual void SetAllowOverlappingViews(bool overlapping) = 0;
91 90
92 // Returns true if overlapping views are allowed, false otherwise. 91 // Returns true if overlapping views are allowed, false otherwise.
93 virtual bool GetAllowOverlappingViews() const = 0; 92 virtual bool GetAllowOverlappingViews() const = 0;
94 #endif 93 #endif
95 }; 94 };
96 95
97 } // namespace content 96 } // namespace content
98 97
99 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_ 98 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | content/public/browser/web_drag_dest_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698