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

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

Issue 398603002: athena: Handle WebContents created for new windows and create activities for these. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only set delegate if actual web contents was passed to SwapWebContents. Created 6 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
« no previous file with comments | « athena/content/web_activity.cc ('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 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
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
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_
OLDNEW
« no previous file with comments | « athena/content/web_activity.cc ('k') | ui/views/controls/webview/webview.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698