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

Side by Side Diff: ui/views/controls/webview/webview.h

Issue 24299004: Implement features in NativeViewHostAura for scroll end effect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_
6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ 6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 11 #include "content/public/browser/notification_registrar.h"
12 #include "content/public/browser/web_contents_delegate.h" 12 #include "content/public/browser/web_contents_delegate.h"
13 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
14 #include "ui/views/accessibility/native_view_accessibility.h" 14 #include "ui/views/accessibility/native_view_accessibility.h"
15 #include "ui/views/controls/native/native_view_host.h"
15 #include "ui/views/controls/webview/webview_export.h" 16 #include "ui/views/controls/webview/webview_export.h"
16 #include "ui/views/view.h" 17 #include "ui/views/view.h"
17 18
18 namespace content { 19 namespace content {
19 class SiteInstance; 20 class SiteInstance;
20 } 21 }
21 22
22 namespace views { 23 namespace views {
23 24
24 class NativeViewHost; 25 class NativeViewHost;
26 enum FastResizeGravity;
sky 2013/09/24 20:23:25 not needed
rharrison 2013/09/26 20:36:48 Done.
25 27
26 class WEBVIEW_EXPORT WebView : public View, 28 class WEBVIEW_EXPORT WebView : public View,
27 public content::NotificationObserver, 29 public content::NotificationObserver,
28 public content::WebContentsDelegate, 30 public content::WebContentsDelegate,
29 public content::WebContentsObserver { 31 public content::WebContentsObserver {
30 public: 32 public:
31 static const char kViewClassName[]; 33 static const char kViewClassName[];
32 34
33 explicit WebView(content::BrowserContext* browser_context); 35 explicit WebView(content::BrowserContext* browser_context);
34 virtual ~WebView(); 36 virtual ~WebView();
(...skipping 29 matching lines...) Expand all
64 66
65 // Controls how the attached WebContents is resized. 67 // Controls how the attached WebContents is resized.
66 // false = WebContents' views' bounds are updated continuously as the 68 // false = WebContents' views' bounds are updated continuously as the
67 // WebView's bounds change (default). 69 // WebView's bounds change (default).
68 // true = WebContents' views' position is updated continuously but its size 70 // true = WebContents' views' position is updated continuously but its size
69 // is not (which may result in some clipping or under-painting) until 71 // is not (which may result in some clipping or under-painting) until
70 // a continuous size operation completes. This allows for smoother 72 // a continuous size operation completes. This allows for smoother
71 // resizing performance during interactive resizes and animations. 73 // resizing performance during interactive resizes and animations.
72 void SetFastResize(bool fast_resize); 74 void SetFastResize(bool fast_resize);
73 75
76 // Controls how the clip is positioned relative to the contents when using
77 // fast resize. Details of the meaning of the parameter can be found in
78 // native_view_host.h
79 void SetFastResizeGravity(FastResizeGravity gravity);
80
74 // Called when the WebContents is focused. 81 // Called when the WebContents is focused.
75 // TODO(beng): This view should become a WebContentsViewObserver when a 82 // TODO(beng): This view should become a WebContentsViewObserver when a
76 // WebContents is attached, and not rely on the delegate to 83 // WebContents is attached, and not rely on the delegate to
77 // forward this notification. 84 // forward this notification.
78 void OnWebContentsFocused(content::WebContents* web_contents); 85 void OnWebContentsFocused(content::WebContents* web_contents);
79 86
80 // When used to host UI, we need to explicitly allow accelerators to be 87 // When used to host UI, we need to explicitly allow accelerators to be
81 // processed. Default is false. 88 // processed. Default is false.
82 void set_allow_accelerators(bool allow_accelerators) { 89 void set_allow_accelerators(bool allow_accelerators) {
83 allow_accelerators_ = allow_accelerators; 90 allow_accelerators_ = allow_accelerators;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 content::NotificationRegistrar registrar_; 151 content::NotificationRegistrar registrar_;
145 bool allow_accelerators_; 152 bool allow_accelerators_;
146 gfx::Size preferred_size_; 153 gfx::Size preferred_size_;
147 154
148 DISALLOW_COPY_AND_ASSIGN(WebView); 155 DISALLOW_COPY_AND_ASSIGN(WebView);
149 }; 156 };
150 157
151 } // namespace views 158 } // namespace views
152 159
153 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ 160 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698