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

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

Issue 662013003: Add unit tests for ui::WebView embedded fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Access private holder_ member via friend class. Created 6 years, 1 month 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
« no previous file with comments | « no previous file | ui/views/controls/webview/webview_unittest.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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override; 123 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override;
124 void DidAttachInterstitialPage() override; 124 void DidAttachInterstitialPage() override;
125 void DidDetachInterstitialPage() override; 125 void DidDetachInterstitialPage() override;
126 // Workaround for MSVC++ linker bug/feature that requires 126 // Workaround for MSVC++ linker bug/feature that requires
127 // instantiation of the inline IPC::Listener methods in all translation units. 127 // instantiation of the inline IPC::Listener methods in all translation units.
128 void OnChannelConnected(int32 peer_id) override {} 128 void OnChannelConnected(int32 peer_id) override {}
129 void OnChannelError() override {} 129 void OnChannelError() override {}
130 void OnBadMessageReceived(const IPC::Message& message) override {} 130 void OnBadMessageReceived(const IPC::Message& message) override {}
131 131
132 private: 132 private:
133 friend class WebViewUnitTest;
134
133 void AttachWebContents(); 135 void AttachWebContents();
134 void DetachWebContents(); 136 void DetachWebContents();
135 void ReattachForFullscreenChange(bool enter_fullscreen); 137 void ReattachForFullscreenChange(bool enter_fullscreen);
136 void NotifyMaybeTextInputClientChanged(); 138 void NotifyMaybeTextInputClientChanged();
137 139
138 // Create a regular or test web contents (based on whether we're running 140 // Create a regular or test web contents (based on whether we're running
139 // in a unit test or not). 141 // in a unit test or not).
140 content::WebContents* CreateWebContents( 142 content::WebContents* CreateWebContents(
141 content::BrowserContext* browser_context); 143 content::BrowserContext* browser_context);
142 144
143 NativeViewHost* const holder_; 145 NativeViewHost* const holder_;
144 // Non-NULL if |web_contents()| was created and is owned by this WebView. 146 // Non-NULL if |web_contents()| was created and is owned by this WebView.
145 scoped_ptr<content::WebContents> wc_owner_; 147 scoped_ptr<content::WebContents> wc_owner_;
146 // When true, WebView auto-embeds fullscreen widgets as a child view. 148 // When true, WebView auto-embeds fullscreen widgets as a child view.
147 bool embed_fullscreen_widget_mode_enabled_; 149 bool embed_fullscreen_widget_mode_enabled_;
148 // Set to true while WebView is embedding a fullscreen widget view as a child 150 // Set to true while WebView is embedding a fullscreen widget view as a child
149 // view instead of the normal WebContentsView render view. Note: This will be 151 // view instead of the normal WebContentsView render view. Note: This will be
150 // false in the case of non-Flash fullscreen. 152 // false in the case of non-Flash fullscreen.
151 bool is_embedding_fullscreen_widget_; 153 bool is_embedding_fullscreen_widget_;
152 content::BrowserContext* browser_context_; 154 content::BrowserContext* browser_context_;
153 bool allow_accelerators_; 155 bool allow_accelerators_;
154 gfx::Size preferred_size_; 156 gfx::Size preferred_size_;
155 157
156 DISALLOW_COPY_AND_ASSIGN(WebView); 158 DISALLOW_COPY_AND_ASSIGN(WebView);
157 }; 159 };
158 160
159 } // namespace views 161 } // namespace views
160 162
161 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ 163 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/webview/webview_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698