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

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

Issue 10171006: Convert more users away from DOMView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/controls/webview/webview.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #pragma once 7 #pragma once
8 8
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"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // a continuous size operation completes. This allows for smoother 57 // a continuous size operation completes. This allows for smoother
58 // resizing performance during interactive resizes and animations. 58 // resizing performance during interactive resizes and animations.
59 void SetFastResize(bool fast_resize); 59 void SetFastResize(bool fast_resize);
60 60
61 // Called when the WebContents is focused. 61 // Called when the WebContents is focused.
62 // TODO(beng): This view should become a WebContentsViewObserver when a 62 // TODO(beng): This view should become a WebContentsViewObserver when a
63 // WebContents is attached, and not rely on the delegate to 63 // WebContents is attached, and not rely on the delegate to
64 // forward this notification. 64 // forward this notification.
65 void OnWebContentsFocused(content::WebContents* web_contents); 65 void OnWebContentsFocused(content::WebContents* web_contents);
66 66
67 // When used to host UI, we need to explicitly allow accelerators to be
68 // processed. Default is false.
69 void set_allow_accelerators(bool allow_accelerators) {
70 allow_accelerators_ = allow_accelerators;
71 }
72
67 // Overridden from View: 73 // Overridden from View:
68 virtual std::string GetClassName() const OVERRIDE; 74 virtual std::string GetClassName() const OVERRIDE;
69 75
70 private: 76 private:
71 // Overridden from View: 77 // Overridden from View:
72 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 78 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE;
73 virtual void ViewHierarchyChanged(bool is_add, 79 virtual void ViewHierarchyChanged(bool is_add,
74 View* parent, 80 View* parent,
75 View* child) OVERRIDE; 81 View* child) OVERRIDE;
76 virtual bool SkipDefaultKeyEventProcessing( 82 virtual bool SkipDefaultKeyEventProcessing(
(...skipping 17 matching lines...) Expand all
94 100
95 void RenderViewHostChanged(content::RenderViewHost* old_host, 101 void RenderViewHostChanged(content::RenderViewHost* old_host,
96 content::RenderViewHost* new_host); 102 content::RenderViewHost* new_host);
97 void WebContentsDestroyed(content::WebContents* web_contents); 103 void WebContentsDestroyed(content::WebContents* web_contents);
98 104
99 NativeViewHost* wcv_holder_; 105 NativeViewHost* wcv_holder_;
100 scoped_ptr<content::WebContents> wc_owner_; 106 scoped_ptr<content::WebContents> wc_owner_;
101 content::WebContents* web_contents_; 107 content::WebContents* web_contents_;
102 content::BrowserContext* browser_context_; 108 content::BrowserContext* browser_context_;
103 content::NotificationRegistrar registrar_; 109 content::NotificationRegistrar registrar_;
110 bool allow_accelerators_;
104 111
105 DISALLOW_COPY_AND_ASSIGN(WebView); 112 DISALLOW_COPY_AND_ASSIGN(WebView);
106 }; 113 };
107 114
108 } // namespace views 115 } // namespace views
109 116
110 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ 117 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/controls/webview/webview.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698