| 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 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/web_contents_delegate.h" | 10 #include "content/public/browser/web_contents_delegate.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // Sets the preferred size. If empty, View's implementation of | 91 // Sets the preferred size. If empty, View's implementation of |
| 92 // GetPreferredSize() is used. | 92 // GetPreferredSize() is used. |
| 93 void SetPreferredSize(const gfx::Size& preferred_size); | 93 void SetPreferredSize(const gfx::Size& preferred_size); |
| 94 | 94 |
| 95 // Overridden from View: | 95 // Overridden from View: |
| 96 virtual const char* GetClassName() const OVERRIDE; | 96 virtual const char* GetClassName() const OVERRIDE; |
| 97 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; | 97 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; |
| 98 | 98 |
| 99 protected: | 99 protected: |
| 100 // Swaps the owned WebContents |wc_owner_| with |new_web_contents|. Returns |
| 101 // the previously owned WebContents. |
| 102 scoped_ptr<content::WebContents> SwapWebContents( |
| 103 scoped_ptr<content::WebContents> new_web_contents); |
| 104 |
| 100 // Overridden from View: | 105 // Overridden from View: |
| 101 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 106 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
| 102 virtual void ViewHierarchyChanged( | 107 virtual void ViewHierarchyChanged( |
| 103 const ViewHierarchyChangedDetails& details) OVERRIDE; | 108 const ViewHierarchyChangedDetails& details) OVERRIDE; |
| 104 virtual bool SkipDefaultKeyEventProcessing( | 109 virtual bool SkipDefaultKeyEventProcessing( |
| 105 const ui::KeyEvent& event) OVERRIDE; | 110 const ui::KeyEvent& event) OVERRIDE; |
| 106 virtual bool IsFocusable() const OVERRIDE; | 111 virtual bool IsFocusable() const OVERRIDE; |
| 107 virtual void OnFocus() OVERRIDE; | 112 virtual void OnFocus() OVERRIDE; |
| 108 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 113 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
| 109 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 114 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 content::BrowserContext* browser_context_; | 160 content::BrowserContext* browser_context_; |
| 156 bool allow_accelerators_; | 161 bool allow_accelerators_; |
| 157 gfx::Size preferred_size_; | 162 gfx::Size preferred_size_; |
| 158 | 163 |
| 159 DISALLOW_COPY_AND_ASSIGN(WebView); | 164 DISALLOW_COPY_AND_ASSIGN(WebView); |
| 160 }; | 165 }; |
| 161 | 166 |
| 162 } // namespace views | 167 } // namespace views |
| 163 | 168 |
| 164 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ | 169 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ |
| OLD | NEW |