summaryrefslogtreecommitdiffstats
path: root/android_webview/native
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-02-03 18:56:54 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-04 02:58:10 +0000
commit9b4dd1aa9e96c92ec4503eefea2c9770001f95f0 (patch)
tree925aa1f5b69bd43d2a8067ec68fb9b709e4fcd85 /android_webview/native
parent361fdb39bdfcf68edd7df903103a399ea7a4f204 (diff)
downloadchromium_src-9b4dd1aa9e96c92ec4503eefea2c9770001f95f0.zip
chromium_src-9b4dd1aa9e96c92ec4503eefea2c9770001f95f0.tar.gz
chromium_src-9b4dd1aa9e96c92ec4503eefea2c9770001f95f0.tar.bz2
Update {virtual,override,final} to follow C++11 style.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was automatically generated with an OS=android build using a variation of https://codereview.chromium.org/598073004. BUG=417463 R=michaelbai@chromium.org Review URL: https://codereview.chromium.org/893343002 Cr-Commit-Position: refs/heads/master@{#314487}
Diffstat (limited to 'android_webview/native')
-rw-r--r--android_webview/native/android_protocol_handler.cc42
-rw-r--r--android_webview/native/aw_autofill_client.h51
-rw-r--r--android_webview/native/aw_contents.h64
-rw-r--r--android_webview/native/aw_contents_client_bridge.h20
-rw-r--r--android_webview/native/aw_contents_client_bridge_unittest.cc2
-rw-r--r--android_webview/native/aw_contents_io_thread_client_impl.cc6
-rw-r--r--android_webview/native/aw_contents_io_thread_client_impl.h32
-rw-r--r--android_webview/native/aw_dev_tools_server.cc4
-rw-r--r--android_webview/native/aw_http_auth_handler.h4
-rw-r--r--android_webview/native/aw_media_url_interceptor.h8
-rw-r--r--android_webview/native/aw_message_port_service_impl.h2
-rw-r--r--android_webview/native/aw_pdf_exporter.h6
-rw-r--r--android_webview/native/aw_quota_manager_bridge_impl.h2
-rw-r--r--android_webview/native/aw_settings.h7
-rw-r--r--android_webview/native/aw_web_contents_delegate.h66
-rw-r--r--android_webview/native/aw_web_contents_view_delegate.h9
-rw-r--r--android_webview/native/aw_web_preferences_populater_impl.h6
-rw-r--r--android_webview/native/aw_web_resource_response_impl.h21
-rw-r--r--android_webview/native/external_video_surface_container_impl.h14
-rw-r--r--android_webview/native/input_stream_impl.h9
-rw-r--r--android_webview/native/input_stream_unittest.cc2
-rw-r--r--android_webview/native/permission/media_access_permission_request.h8
-rw-r--r--android_webview/native/permission/media_access_permission_request_unittest.cc2
-rw-r--r--android_webview/native/permission/permission_request_handler.h4
-rw-r--r--android_webview/native/permission/permission_request_handler_unittest.cc19
-rw-r--r--android_webview/native/permission/simple_permission_request.h8
26 files changed, 196 insertions, 222 deletions
diff --git a/android_webview/native/android_protocol_handler.cc b/android_webview/native/android_protocol_handler.cc
index 4bdf6ec..c80d9bd 100644
--- a/android_webview/native/android_protocol_handler.cc
+++ b/android_webview/native/android_protocol_handler.cc
@@ -60,33 +60,31 @@ class AndroidStreamReaderURLRequestJobDelegateImpl
public:
AndroidStreamReaderURLRequestJobDelegateImpl();
- virtual scoped_ptr<InputStream> OpenInputStream(
- JNIEnv* env,
- const GURL& url) override;
+ scoped_ptr<InputStream> OpenInputStream(JNIEnv* env,
+ const GURL& url) override;
- virtual void OnInputStreamOpenFailed(net::URLRequest* request,
- bool* restart) override;
+ void OnInputStreamOpenFailed(net::URLRequest* request,
+ bool* restart) override;
- virtual bool GetMimeType(JNIEnv* env,
- net::URLRequest* request,
- InputStream* stream,
- std::string* mime_type) override;
+ bool GetMimeType(JNIEnv* env,
+ net::URLRequest* request,
+ InputStream* stream,
+ std::string* mime_type) override;
- virtual bool GetCharset(JNIEnv* env,
- net::URLRequest* request,
- InputStream* stream,
- std::string* charset) override;
+ bool GetCharset(JNIEnv* env,
+ net::URLRequest* request,
+ InputStream* stream,
+ std::string* charset) override;
- virtual void AppendResponseHeaders(
- JNIEnv* env,
- net::HttpResponseHeaders* headers) override;
+ void AppendResponseHeaders(JNIEnv* env,
+ net::HttpResponseHeaders* headers) override;
- virtual ~AndroidStreamReaderURLRequestJobDelegateImpl();
+ ~AndroidStreamReaderURLRequestJobDelegateImpl() override;
};
class AndroidRequestInterceptorBase : public net::URLRequestInterceptor {
public:
- virtual net::URLRequestJob* MaybeInterceptRequest(
+ net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override;
@@ -97,9 +95,8 @@ class AssetFileRequestInterceptor : public AndroidRequestInterceptorBase {
public:
AssetFileRequestInterceptor();
- virtual ~AssetFileRequestInterceptor() override;
- virtual bool ShouldHandleRequest(
- const net::URLRequest* request) const override;
+ ~AssetFileRequestInterceptor() override;
+ bool ShouldHandleRequest(const net::URLRequest* request) const override;
private:
// file:///android_asset/
@@ -112,8 +109,7 @@ class AssetFileRequestInterceptor : public AndroidRequestInterceptorBase {
class ContentSchemeRequestInterceptor : public AndroidRequestInterceptorBase {
public:
ContentSchemeRequestInterceptor();
- virtual bool ShouldHandleRequest(
- const net::URLRequest* request) const override;
+ bool ShouldHandleRequest(const net::URLRequest* request) const override;
};
static ScopedJavaLocalRef<jobject> GetResourceContext(JNIEnv* env) {
diff --git a/android_webview/native/aw_autofill_client.h b/android_webview/native/aw_autofill_client.h
index dd85587..9881f8d 100644
--- a/android_webview/native/aw_autofill_client.h
+++ b/android_webview/native/aw_autofill_client.h
@@ -50,50 +50,45 @@ namespace android_webview {
class AwAutofillClient : public autofill::AutofillClient,
public content::WebContentsUserData<AwAutofillClient> {
public:
- virtual ~AwAutofillClient();
+ ~AwAutofillClient() override;
void SetSaveFormData(bool enabled);
bool GetSaveFormData();
// AutofillClient:
- virtual autofill::PersonalDataManager* GetPersonalDataManager() override;
- virtual scoped_refptr<autofill::AutofillWebDataService> GetDatabase()
- override;
- virtual PrefService* GetPrefs() override;
+ autofill::PersonalDataManager* GetPersonalDataManager() override;
+ scoped_refptr<autofill::AutofillWebDataService> GetDatabase() override;
+ PrefService* GetPrefs() override;
IdentityProvider* GetIdentityProvider() override;
- virtual void HideRequestAutocompleteDialog() override;
- virtual void ShowAutofillSettings() override;
- virtual void ShowUnmaskPrompt(
+ void HideRequestAutocompleteDialog() override;
+ void ShowAutofillSettings() override;
+ void ShowUnmaskPrompt(
const autofill::CreditCard& card,
base::WeakPtr<autofill::CardUnmaskDelegate> delegate) override;
- virtual void OnUnmaskVerificationResult(bool success) override;
- virtual void ConfirmSaveCreditCard(
- const base::Closure& save_card_callback) override;
- virtual bool HasCreditCardScanFeature() override;
- virtual void ScanCreditCard(const CreditCardScanCallback& callback) override;
- virtual void ShowRequestAutocompleteDialog(
- const autofill::FormData& form,
- content::RenderFrameHost* rfh,
- const ResultCallback& callback) override;
- virtual void ShowAutofillPopup(
+ void OnUnmaskVerificationResult(bool success) override;
+ void ConfirmSaveCreditCard(const base::Closure& save_card_callback) override;
+ bool HasCreditCardScanFeature() override;
+ void ScanCreditCard(const CreditCardScanCallback& callback) override;
+ void ShowRequestAutocompleteDialog(const autofill::FormData& form,
+ content::RenderFrameHost* rfh,
+ const ResultCallback& callback) override;
+ void ShowAutofillPopup(
const gfx::RectF& element_bounds,
base::i18n::TextDirection text_direction,
const std::vector<autofill::Suggestion>& suggestions,
base::WeakPtr<autofill::AutofillPopupDelegate> delegate) override;
- virtual void UpdateAutofillPopupDataListValues(
+ void UpdateAutofillPopupDataListValues(
const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) override;
- virtual void HideAutofillPopup() override;
- virtual bool IsAutocompleteEnabled() override;
- virtual void DetectAccountCreationForms(
+ void HideAutofillPopup() override;
+ bool IsAutocompleteEnabled() override;
+ void DetectAccountCreationForms(
content::RenderFrameHost* rfh,
const std::vector<autofill::FormStructure*>& forms) override;
- virtual void DidFillOrPreviewField(
- const base::string16& autofilled_value,
- const base::string16& profile_full_name) override;
- virtual void OnFirstUserGestureObserved() override;
- virtual void LinkClicked(const GURL& url,
- WindowOpenDisposition disposition) override;
+ void DidFillOrPreviewField(const base::string16& autofilled_value,
+ const base::string16& profile_full_name) override;
+ void OnFirstUserGestureObserved() override;
+ void LinkClicked(const GURL& url, WindowOpenDisposition disposition) override;
void SuggestionSelected(JNIEnv* env, jobject obj, jint position);
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
index 8987dc2..7110eba 100644
--- a/android_webview/native/aw_contents.h
+++ b/android_webview/native/aw_contents.h
@@ -69,7 +69,7 @@ class AwContents : public FindHelper::Listener,
static AwContents* FromID(int render_process_id, int render_view_id);
AwContents(scoped_ptr<content::WebContents> web_contents);
- virtual ~AwContents();
+ ~AwContents() override;
AwRenderViewHostExt* render_view_host_ext() {
return render_view_host_ext_.get();
@@ -139,9 +139,8 @@ class AwContents : public FindHelper::Listener,
jstring origin);
// PermissionRequestHandlerClient implementation.
- virtual void OnPermissionRequest(AwPermissionRequest* request) override;
- virtual void OnPermissionRequestCanceled(
- AwPermissionRequest* request) override;
+ void OnPermissionRequest(AwPermissionRequest* request) override;
+ void OnPermissionRequestCanceled(AwPermissionRequest* request) override;
PermissionRequestHandler* GetPermissionRequestHandler() {
return permission_request_handler_.get();
@@ -153,17 +152,15 @@ class AwContents : public FindHelper::Listener,
jlong resources);
// AwBrowserPermissionRequestDelegate implementation.
- virtual void RequestProtectedMediaIdentifierPermission(
+ void RequestProtectedMediaIdentifierPermission(
const GURL& origin,
const base::Callback<void(bool)>& callback) override;
- virtual void CancelProtectedMediaIdentifierPermissionRequests(
+ void CancelProtectedMediaIdentifierPermissionRequests(
const GURL& origin) override;
- virtual void RequestGeolocationPermission(
+ void RequestGeolocationPermission(
const GURL& origin,
const base::Callback<void(bool)>& callback) override;
- virtual void CancelGeolocationPermissionRequests(
- const GURL& origin) override;
-
+ void CancelGeolocationPermissionRequests(const GURL& origin) override;
// Find-in-page API and related methods.
void FindAllAsync(JNIEnv* env, jobject obj, jstring search_string);
@@ -175,36 +172,33 @@ class AwContents : public FindHelper::Listener,
bool AllowThirdPartyCookies();
// FindHelper::Listener implementation.
- virtual void OnFindResultReceived(int active_ordinal,
- int match_count,
- bool finished) override;
+ void OnFindResultReceived(int active_ordinal,
+ int match_count,
+ bool finished) override;
// IconHelper::Listener implementation.
- virtual bool ShouldDownloadFavicon(const GURL& icon_url) override;
- virtual void OnReceivedIcon(const GURL& icon_url,
- const SkBitmap& bitmap) override;
- virtual void OnReceivedTouchIconUrl(const std::string& url,
- const bool precomposed) override;
+ bool ShouldDownloadFavicon(const GURL& icon_url) override;
+ void OnReceivedIcon(const GURL& icon_url, const SkBitmap& bitmap) override;
+ void OnReceivedTouchIconUrl(const std::string& url,
+ const bool precomposed) override;
// AwRenderViewHostExtClient implementation.
- virtual void OnWebLayoutPageScaleFactorChanged(
- float page_scale_factor) override;
- virtual void OnWebLayoutContentsSizeChanged(
- const gfx::Size& contents_size) override;
+ void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) override;
+ void OnWebLayoutContentsSizeChanged(const gfx::Size& contents_size) override;
// BrowserViewRendererClient implementation.
- virtual bool RequestDrawGL(bool wait_for_completion) override;
- virtual void PostInvalidate() override;
- virtual void InvalidateOnFunctorDestroy() override;
- virtual void OnNewPicture() override;
- virtual gfx::Point GetLocationOnScreen() override;
- virtual void ScrollContainerViewTo(gfx::Vector2d new_value) override;
- virtual bool IsFlingActive() const override;
- virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset,
- gfx::SizeF contents_size_dip,
- float page_scale_factor,
- float min_page_scale_factor,
- float max_page_scale_factor) override;
- virtual void DidOverscroll(gfx::Vector2d overscroll_delta) override;
+ bool RequestDrawGL(bool wait_for_completion) override;
+ void PostInvalidate() override;
+ void InvalidateOnFunctorDestroy() override;
+ void OnNewPicture() override;
+ gfx::Point GetLocationOnScreen() override;
+ void ScrollContainerViewTo(gfx::Vector2d new_value) override;
+ bool IsFlingActive() const override;
+ void UpdateScrollState(gfx::Vector2d max_scroll_offset,
+ gfx::SizeF contents_size_dip,
+ float page_scale_factor,
+ float min_page_scale_factor,
+ float max_page_scale_factor) override;
+ void DidOverscroll(gfx::Vector2d overscroll_delta) override;
const BrowserViewRenderer* GetBrowserViewRenderer() const;
diff --git a/android_webview/native/aw_contents_client_bridge.h b/android_webview/native/aw_contents_client_bridge.h
index d50fa62..2a5caba 100644
--- a/android_webview/native/aw_contents_client_bridge.h
+++ b/android_webview/native/aw_contents_client_bridge.h
@@ -30,31 +30,31 @@ namespace android_webview {
class AwContentsClientBridge : public AwContentsClientBridgeBase {
public:
AwContentsClientBridge(JNIEnv* env, jobject obj);
- virtual ~AwContentsClientBridge();
+ ~AwContentsClientBridge() override;
// AwContentsClientBridgeBase implementation
- virtual void AllowCertificateError(int cert_error,
- net::X509Certificate* cert,
- const GURL& request_url,
- const base::Callback<void(bool)>& callback,
- bool* cancel_request) override;
- virtual void SelectClientCertificate(
+ void AllowCertificateError(int cert_error,
+ net::X509Certificate* cert,
+ const GURL& request_url,
+ const base::Callback<void(bool)>& callback,
+ bool* cancel_request) override;
+ void SelectClientCertificate(
net::SSLCertRequestInfo* cert_request_info,
const SelectCertificateCallback& callback) override;
- virtual void RunJavaScriptDialog(
+ void RunJavaScriptDialog(
content::JavaScriptMessageType message_type,
const GURL& origin_url,
const base::string16& message_text,
const base::string16& default_prompt_text,
const content::JavaScriptDialogManager::DialogClosedCallback& callback)
override;
- virtual void RunBeforeUnloadDialog(
+ void RunBeforeUnloadDialog(
const GURL& origin_url,
const base::string16& message_text,
const content::JavaScriptDialogManager::DialogClosedCallback& callback)
override;
- virtual bool ShouldOverrideUrlLoading(const base::string16& url) override;
+ bool ShouldOverrideUrlLoading(const base::string16& url) override;
// Methods called from Java.
void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id);
diff --git a/android_webview/native/aw_contents_client_bridge_unittest.cc b/android_webview/native/aw_contents_client_bridge_unittest.cc
index e6714bb..b301f91 100644
--- a/android_webview/native/aw_contents_client_bridge_unittest.cc
+++ b/android_webview/native/aw_contents_client_bridge_unittest.cc
@@ -41,7 +41,7 @@ class AwContentsClientBridgeTest : public Test {
// Callback method called when a cert is selected.
void CertSelected(X509Certificate* cert);
protected:
- virtual void SetUp();
+ void SetUp() override;
void TestCertType(SSLClientCertType type, const std::string& expected_name);
// Create the TestBrowserThreads. Just instantiate the member variable.
content::TestBrowserThreadBundle thread_bundle_;
diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc
index 4f7ce44..69003ae 100644
--- a/android_webview/native/aw_contents_io_thread_client_impl.cc
+++ b/android_webview/native/aw_contents_io_thread_client_impl.cc
@@ -116,9 +116,9 @@ class ClientMapEntryUpdater : public content::WebContentsObserver {
ClientMapEntryUpdater(JNIEnv* env, WebContents* web_contents,
jobject jdelegate);
- virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
- virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
- virtual void WebContentsDestroyed() override;
+ void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
+ void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
+ void WebContentsDestroyed() override;
private:
JavaObjectWeakGlobalRef jdelegate_;
diff --git a/android_webview/native/aw_contents_io_thread_client_impl.h b/android_webview/native/aw_contents_io_thread_client_impl.h
index 4c9d555..320d35b 100644
--- a/android_webview/native/aw_contents_io_thread_client_impl.h
+++ b/android_webview/native/aw_contents_io_thread_client_impl.h
@@ -42,26 +42,26 @@ class AwContentsIoThreadClientImpl : public AwContentsIoThreadClient {
// Java object.
AwContentsIoThreadClientImpl(bool pending_associate,
const base::android::JavaRef<jobject>& jclient);
- virtual ~AwContentsIoThreadClientImpl() override;
+ ~AwContentsIoThreadClientImpl() override;
// Implementation of AwContentsIoThreadClient.
- virtual bool PendingAssociation() const override;
- virtual CacheMode GetCacheMode() const override;
- virtual scoped_ptr<AwWebResourceResponse> ShouldInterceptRequest(
+ bool PendingAssociation() const override;
+ CacheMode GetCacheMode() const override;
+ scoped_ptr<AwWebResourceResponse> ShouldInterceptRequest(
const GURL& location,
const net::URLRequest* request) override;
- virtual bool ShouldBlockContentUrls() const override;
- virtual bool ShouldBlockFileUrls() const override;
- virtual bool ShouldAcceptThirdPartyCookies() const override;
- virtual bool ShouldBlockNetworkLoads() const override;
- virtual void NewDownload(const GURL& url,
- const std::string& user_agent,
- const std::string& content_disposition,
- const std::string& mime_type,
- int64 content_length) override;
- virtual void NewLoginRequest(const std::string& realm,
- const std::string& account,
- const std::string& args) override;
+ bool ShouldBlockContentUrls() const override;
+ bool ShouldBlockFileUrls() const override;
+ bool ShouldAcceptThirdPartyCookies() const override;
+ bool ShouldBlockNetworkLoads() const override;
+ void NewDownload(const GURL& url,
+ const std::string& user_agent,
+ const std::string& content_disposition,
+ const std::string& mime_type,
+ int64 content_length) override;
+ void NewLoginRequest(const std::string& realm,
+ const std::string& account,
+ const std::string& args) override;
private:
bool pending_association_;
diff --git a/android_webview/native/aw_dev_tools_server.cc b/android_webview/native/aw_dev_tools_server.cc
index 9c96694..52d474e 100644
--- a/android_webview/native/aw_dev_tools_server.cc
+++ b/android_webview/native/aw_dev_tools_server.cc
@@ -42,7 +42,7 @@ class AwDevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate {
AwDevToolsServerDelegate() {
}
- virtual ~AwDevToolsServerDelegate() {}
+ ~AwDevToolsServerDelegate() override {}
// DevToolsHttpProtocolHandler::Delegate overrides.
std::string GetDiscoveryPageHTML() override;
@@ -81,7 +81,7 @@ class UnixDomainServerSocketFactory
private:
// content::DevToolsHttpHandler::ServerSocketFactory.
- virtual scoped_ptr<net::ServerSocket> CreateForHttpServer() override {
+ scoped_ptr<net::ServerSocket> CreateForHttpServer() override {
scoped_ptr<net::ServerSocket> socket(
new net::UnixDomainServerSocket(
base::Bind(&content::CanUserConnectToDevTools),
diff --git a/android_webview/native/aw_http_auth_handler.h b/android_webview/native/aw_http_auth_handler.h
index c063702..79b7406 100644
--- a/android_webview/native/aw_http_auth_handler.h
+++ b/android_webview/native/aw_http_auth_handler.h
@@ -32,10 +32,10 @@ class AwHttpAuthHandler : public AwHttpAuthHandlerBase {
AwHttpAuthHandler(AwLoginDelegate* login_delegate,
net::AuthChallengeInfo* auth_info,
bool first_auth_attempt);
- virtual ~AwHttpAuthHandler();
+ ~AwHttpAuthHandler() override;
// from AwHttpAuthHandler
- virtual bool HandleOnUIThread(content::WebContents* web_contents) override;
+ bool HandleOnUIThread(content::WebContents* web_contents) override;
void Proceed(JNIEnv* env, jobject obj, jstring username, jstring password);
void Cancel(JNIEnv* env, jobject obj);
diff --git a/android_webview/native/aw_media_url_interceptor.h b/android_webview/native/aw_media_url_interceptor.h
index a6370a9..332fd37 100644
--- a/android_webview/native/aw_media_url_interceptor.h
+++ b/android_webview/native/aw_media_url_interceptor.h
@@ -15,10 +15,10 @@ namespace android_webview {
// Interceptor to handle urls for media assets in the apk.
class AwMediaUrlInterceptor : public media::MediaUrlInterceptor {
public:
- virtual bool Intercept(const std::string& url,
- int* fd,
- int64* offset,
- int64* size) const override;
+ bool Intercept(const std::string& url,
+ int* fd,
+ int64* offset,
+ int64* size) const override;
};
} // namespace android_webview
diff --git a/android_webview/native/aw_message_port_service_impl.h b/android_webview/native/aw_message_port_service_impl.h
index 757d75d..f72f80e 100644
--- a/android_webview/native/aw_message_port_service_impl.h
+++ b/android_webview/native/aw_message_port_service_impl.h
@@ -26,7 +26,7 @@ class AwMessagePortServiceImpl : public AwMessagePortService {
static AwMessagePortServiceImpl* GetInstance();
AwMessagePortServiceImpl();
- ~AwMessagePortServiceImpl();
+ ~AwMessagePortServiceImpl() override;
void Init(JNIEnv* env, jobject object);
void CreateMessageChannel(JNIEnv* env, jobject callback,
diff --git a/android_webview/native/aw_pdf_exporter.h b/android_webview/native/aw_pdf_exporter.h
index 9ead85e..1321354 100644
--- a/android_webview/native/aw_pdf_exporter.h
+++ b/android_webview/native/aw_pdf_exporter.h
@@ -30,7 +30,7 @@ class AwPdfExporter : public PrintManagerDelegate {
jobject obj,
content::WebContents* web_contents);
- virtual ~AwPdfExporter();
+ ~AwPdfExporter() override;
void ExportToPdf(JNIEnv* env,
jobject obj,
@@ -38,8 +38,8 @@ class AwPdfExporter : public PrintManagerDelegate {
jobject cancel_signal);
// Implement PrintManagerDelegate methods
- virtual void DidExportPdf(bool success) override;
- virtual bool IsCancelled() override;
+ void DidExportPdf(bool success) override;
+ bool IsCancelled() override;
private:
void CreatePdfSettings(JNIEnv* env, jobject obj);
diff --git a/android_webview/native/aw_quota_manager_bridge_impl.h b/android_webview/native/aw_quota_manager_bridge_impl.h
index b327df1..dc7f20f3 100644
--- a/android_webview/native/aw_quota_manager_bridge_impl.h
+++ b/android_webview/native/aw_quota_manager_bridge_impl.h
@@ -56,7 +56,7 @@ class AwQuotaManagerBridgeImpl : public AwQuotaManagerBridge {
private:
explicit AwQuotaManagerBridgeImpl(AwBrowserContext* browser_context);
- virtual ~AwQuotaManagerBridgeImpl();
+ ~AwQuotaManagerBridgeImpl() override;
content::StoragePartition* GetStoragePartition() const;
diff --git a/android_webview/native/aw_settings.h b/android_webview/native/aw_settings.h
index 141320d..581a6cd 100644
--- a/android_webview/native/aw_settings.h
+++ b/android_webview/native/aw_settings.h
@@ -25,7 +25,7 @@ class AwSettings : public content::WebContentsObserver {
static AwSettings* FromWebContents(content::WebContents* web_contents);
AwSettings(JNIEnv* env, jobject obj, content::WebContents* web_contents);
- virtual ~AwSettings();
+ ~AwSettings() override;
// Called from Java. Methods with "Locked" suffix require that the settings
// access lock is held during their execution.
@@ -46,9 +46,8 @@ class AwSettings : public content::WebContentsObserver {
void UpdateEverything();
// WebContentsObserver overrides:
- virtual void RenderViewCreated(
- content::RenderViewHost* render_view_host) override;
- virtual void WebContentsDestroyed() override;
+ void RenderViewCreated(content::RenderViewHost* render_view_host) override;
+ void WebContentsDestroyed() override;
bool renderer_prefs_initialized_;
diff --git a/android_webview/native/aw_web_contents_delegate.h b/android_webview/native/aw_web_contents_delegate.h
index 9277a54..96cd325 100644
--- a/android_webview/native/aw_web_contents_delegate.h
+++ b/android_webview/native/aw_web_contents_delegate.h
@@ -18,46 +18,44 @@ class AwWebContentsDelegate
: public web_contents_delegate_android::WebContentsDelegateAndroid {
public:
AwWebContentsDelegate(JNIEnv* env, jobject obj);
- virtual ~AwWebContentsDelegate();
- virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager(
+ ~AwWebContentsDelegate() override;
+ content::JavaScriptDialogManager* GetJavaScriptDialogManager(
content::WebContents* source) override;
- virtual void FindReply(content::WebContents* web_contents,
- int request_id,
- int number_of_matches,
- const gfx::Rect& selection_rect,
- int active_match_ordinal,
- bool final_update) override;
- virtual void CanDownload(content::RenderViewHost* source,
- const GURL& url,
- const std::string& request_method,
- const base::Callback<void(bool)>& callback) override;
- virtual void RunFileChooser(
- content::WebContents* web_contents,
- const content::FileChooserParams& params) override;
- virtual void AddNewContents(content::WebContents* source,
- content::WebContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_rect,
- bool user_gesture,
- bool* was_blocked) override;
+ void FindReply(content::WebContents* web_contents,
+ int request_id,
+ int number_of_matches,
+ const gfx::Rect& selection_rect,
+ int active_match_ordinal,
+ bool final_update) override;
+ void CanDownload(content::RenderViewHost* source,
+ const GURL& url,
+ const std::string& request_method,
+ const base::Callback<void(bool)>& callback) override;
+ void RunFileChooser(content::WebContents* web_contents,
+ const content::FileChooserParams& params) override;
+ void AddNewContents(content::WebContents* source,
+ content::WebContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_rect,
+ bool user_gesture,
+ bool* was_blocked) override;
- virtual void WebContentsCreated(content::WebContents* source_contents,
- int opener_render_frame_id,
- const base::string16& frame_name,
- const GURL& target_url,
- content::WebContents* new_contents) override;
+ void WebContentsCreated(content::WebContents* source_contents,
+ int opener_render_frame_id,
+ const base::string16& frame_name,
+ const GURL& target_url,
+ content::WebContents* new_contents) override;
- virtual void CloseContents(content::WebContents* source) override;
- virtual void ActivateContents(content::WebContents* contents) override;
- virtual void RequestMediaAccessPermission(
+ void CloseContents(content::WebContents* source) override;
+ void ActivateContents(content::WebContents* contents) override;
+ void RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) override;
- virtual void EnterFullscreenModeForTab(content::WebContents* web_contents,
- const GURL& origin) override;
- virtual void ExitFullscreenModeForTab(
- content::WebContents* web_contents) override;
- virtual bool IsFullscreenForTabOrPending(
+ void EnterFullscreenModeForTab(content::WebContents* web_contents,
+ const GURL& origin) override;
+ void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
+ bool IsFullscreenForTabOrPending(
const content::WebContents* web_contents) const override;
private:
diff --git a/android_webview/native/aw_web_contents_view_delegate.h b/android_webview/native/aw_web_contents_view_delegate.h
index 95fd0d6a..c4b438a 100644
--- a/android_webview/native/aw_web_contents_view_delegate.h
+++ b/android_webview/native/aw_web_contents_view_delegate.h
@@ -22,13 +22,12 @@ class AwWebContentsViewDelegate : public content::WebContentsViewDelegate {
static content::WebContentsViewDelegate* Create(
content::WebContents* web_contents);
- virtual ~AwWebContentsViewDelegate();
+ ~AwWebContentsViewDelegate() override;
// content::WebContentsViewDelegate implementation.
- virtual content::WebDragDestDelegate* GetDragDestDelegate() override;
- virtual void ShowContextMenu(
- content::RenderFrameHost* render_frame_host,
- const content::ContextMenuParams& params) override;
+ content::WebDragDestDelegate* GetDragDestDelegate() override;
+ void ShowContextMenu(content::RenderFrameHost* render_frame_host,
+ const content::ContextMenuParams& params) override;
private:
AwWebContentsViewDelegate(content::WebContents* web_contents);
diff --git a/android_webview/native/aw_web_preferences_populater_impl.h b/android_webview/native/aw_web_preferences_populater_impl.h
index 9831b04..8b02845 100644
--- a/android_webview/native/aw_web_preferences_populater_impl.h
+++ b/android_webview/native/aw_web_preferences_populater_impl.h
@@ -15,11 +15,11 @@ class AwSettings;
class AwWebPreferencesPopulaterImpl : public AwWebPreferencesPopulater {
public:
AwWebPreferencesPopulaterImpl();
- virtual ~AwWebPreferencesPopulaterImpl();
+ ~AwWebPreferencesPopulaterImpl() override;
// AwWebPreferencesPopulater
- virtual void PopulateFor(content::WebContents* web_contents,
- content::WebPreferences* web_prefs) override;
+ void PopulateFor(content::WebContents* web_contents,
+ content::WebPreferences* web_prefs) override;
};
} // namespace android_webview
diff --git a/android_webview/native/aw_web_resource_response_impl.h b/android_webview/native/aw_web_resource_response_impl.h
index a33db6e..842a2cb 100644
--- a/android_webview/native/aw_web_resource_response_impl.h
+++ b/android_webview/native/aw_web_resource_response_impl.h
@@ -23,17 +23,16 @@ class AwWebResourceResponseImpl : public AwWebResourceResponse {
// It is expected that |obj| is an instance of the Java-side
// org.chromium.android_webview.AwWebResourceResponse class.
AwWebResourceResponseImpl(const base::android::JavaRef<jobject>& obj);
- virtual ~AwWebResourceResponseImpl();
-
- virtual scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const override;
- virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const override;
- virtual bool GetCharset(JNIEnv* env, std::string* charset) const override;
- virtual bool GetStatusInfo(JNIEnv* env,
- int* status_code,
- std::string* reason_phrase) const override;
- virtual bool GetResponseHeaders(
- JNIEnv* env,
- net::HttpResponseHeaders* headers) const override;
+ ~AwWebResourceResponseImpl() override;
+
+ scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const override;
+ bool GetMimeType(JNIEnv* env, std::string* mime_type) const override;
+ bool GetCharset(JNIEnv* env, std::string* charset) const override;
+ bool GetStatusInfo(JNIEnv* env,
+ int* status_code,
+ std::string* reason_phrase) const override;
+ bool GetResponseHeaders(JNIEnv* env,
+ net::HttpResponseHeaders* headers) const override;
private:
base::android::ScopedJavaGlobalRef<jobject> java_object_;
diff --git a/android_webview/native/external_video_surface_container_impl.h b/android_webview/native/external_video_surface_container_impl.h
index ff741d8..29e7889 100644
--- a/android_webview/native/external_video_surface_container_impl.h
+++ b/android_webview/native/external_video_surface_container_impl.h
@@ -23,15 +23,15 @@ class ExternalVideoSurfaceContainerImpl
ExternalVideoSurfaceContainerImpl(content::WebContents* contents);
// ExternalVideoSurfaceContainer implementation.
- virtual void RequestExternalVideoSurface(
+ void RequestExternalVideoSurface(
int player_id,
const SurfaceCreatedCB& surface_created_cb,
const SurfaceDestroyedCB& surface_destroyed_cb) override;
- virtual int GetCurrentPlayerId() override;
- virtual void ReleaseExternalVideoSurface(int player_id) override;
- virtual void OnFrameInfoUpdated() override;
- virtual void OnExternalVideoSurfacePositionChanged(
- int player_id, const gfx::RectF& rect) override;
+ int GetCurrentPlayerId() override;
+ void ReleaseExternalVideoSurface(int player_id) override;
+ void OnFrameInfoUpdated() override;
+ void OnExternalVideoSurfacePositionChanged(int player_id,
+ const gfx::RectF& rect) override;
// Methods called from Java.
void SurfaceCreated(
@@ -39,7 +39,7 @@ class ExternalVideoSurfaceContainerImpl
void SurfaceDestroyed(JNIEnv* env, jobject obj, jint player_id);
private:
- virtual ~ExternalVideoSurfaceContainerImpl();
+ ~ExternalVideoSurfaceContainerImpl() override;
base::android::ScopedJavaGlobalRef<jobject> jobject_;
diff --git a/android_webview/native/input_stream_impl.h b/android_webview/native/input_stream_impl.h
index 4a950e8..aebd7ac 100644
--- a/android_webview/native/input_stream_impl.h
+++ b/android_webview/native/input_stream_impl.h
@@ -26,15 +26,16 @@ class InputStreamImpl : public InputStream {
// |stream| should be an instance of the InputStream Java class.
// |stream| can't be null.
InputStreamImpl(const base::android::JavaRef<jobject>& stream);
- virtual ~InputStreamImpl();
+ ~InputStreamImpl() override;
// Gets the underlying Java object. Guaranteed non-NULL.
const jobject jobj() const { return jobject_.obj(); }
// InputStream implementation.
- virtual bool BytesAvailable(int* bytes_available) const override;
- virtual bool Skip(int64_t n, int64_t* bytes_skipped) override;
- virtual bool Read(net::IOBuffer* dest, int length, int* bytes_read) override;
+ bool BytesAvailable(int* bytes_available) const override;
+ bool Skip(int64_t n, int64_t* bytes_skipped) override;
+ bool Read(net::IOBuffer* dest, int length, int* bytes_read) override;
+
protected:
// Parameterless constructor exposed for testing.
InputStreamImpl();
diff --git a/android_webview/native/input_stream_unittest.cc b/android_webview/native/input_stream_unittest.cc
index ec4faf6..95d7bf5 100644
--- a/android_webview/native/input_stream_unittest.cc
+++ b/android_webview/native/input_stream_unittest.cc
@@ -35,7 +35,7 @@ class InputStreamTest : public Test {
InputStreamTest() {
}
protected:
- virtual void SetUp() {
+ void SetUp() override {
env_ = AttachCurrentThread();
ASSERT_THAT(env_, NotNull());
ASSERT_TRUE(android_webview::RegisterInputStream(env_));
diff --git a/android_webview/native/permission/media_access_permission_request.h b/android_webview/native/permission/media_access_permission_request.h
index 080d7f3..01bc83e 100644
--- a/android_webview/native/permission/media_access_permission_request.h
+++ b/android_webview/native/permission/media_access_permission_request.h
@@ -17,12 +17,12 @@ class MediaAccessPermissionRequest : public AwPermissionRequestDelegate {
public:
MediaAccessPermissionRequest(const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback);
- virtual ~MediaAccessPermissionRequest();
+ ~MediaAccessPermissionRequest() override;
// AwPermissionRequestDelegate implementation.
- virtual const GURL& GetOrigin() override;
- virtual int64 GetResources() override;
- virtual void NotifyRequestResult(bool allowed) override;
+ const GURL& GetOrigin() override;
+ int64 GetResources() override;
+ void NotifyRequestResult(bool allowed) override;
private:
friend class TestMediaAccessPermissionRequest;
diff --git a/android_webview/native/permission/media_access_permission_request_unittest.cc b/android_webview/native/permission/media_access_permission_request_unittest.cc
index 32a1906..a2ba5aa 100644
--- a/android_webview/native/permission/media_access_permission_request_unittest.cc
+++ b/android_webview/native/permission/media_access_permission_request_unittest.cc
@@ -23,7 +23,7 @@ class TestMediaAccessPermissionRequest : public MediaAccessPermissionRequest {
class MediaAccessPermissionRequestTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
audio_device_id_ = "audio";
video_device_id_ = "video";
first_audio_device_id_ = "audio1";
diff --git a/android_webview/native/permission/permission_request_handler.h b/android_webview/native/permission/permission_request_handler.h
index 2318b57..7b264f7 100644
--- a/android_webview/native/permission/permission_request_handler.h
+++ b/android_webview/native/permission/permission_request_handler.h
@@ -27,7 +27,7 @@ class PermissionRequestHandler : public content::WebContentsObserver {
public:
PermissionRequestHandler(PermissionRequestHandlerClient* client,
content::WebContents* aw_contents);
- virtual ~PermissionRequestHandler();
+ ~PermissionRequestHandler() override;
// Send the given |request| to PermissionRequestHandlerClient.
void SendRequest(scoped_ptr<AwPermissionRequestDelegate> request);
@@ -39,7 +39,7 @@ class PermissionRequestHandler : public content::WebContentsObserver {
void PreauthorizePermission(const GURL& origin, int64 resources);
// WebContentsObserver
- virtual void NavigationEntryCommitted(
+ void NavigationEntryCommitted(
const content::LoadCommittedDetails& load_details) override;
private:
diff --git a/android_webview/native/permission/permission_request_handler_unittest.cc b/android_webview/native/permission/permission_request_handler_unittest.cc
index 775e5fb..0afad0742 100644
--- a/android_webview/native/permission/permission_request_handler_unittest.cc
+++ b/android_webview/native/permission/permission_request_handler_unittest.cc
@@ -21,19 +21,13 @@ class TestAwPermissionRequestDelegate : public AwPermissionRequestDelegate {
callback_(callback) {}
// Get the origin which initiated the permission request.
- virtual const GURL& GetOrigin() override {
- return origin_;
- }
+ const GURL& GetOrigin() override { return origin_; }
// Get the resources the origin wanted to access.
- virtual int64 GetResources() override {
- return resources_;
- }
+ int64 GetResources() override { return resources_; }
// Notify the permission request is allowed or not.
- virtual void NotifyRequestResult(bool allowed) override {
- callback_.Run(allowed);
- }
+ void NotifyRequestResult(bool allowed) override { callback_.Run(allowed); }
private:
GURL origin_;
@@ -57,14 +51,13 @@ class TestPermissionRequestHandlerClient :
TestPermissionRequestHandlerClient()
: request_(NULL) {}
- virtual void OnPermissionRequest(AwPermissionRequest* request) override {
+ void OnPermissionRequest(AwPermissionRequest* request) override {
request_ = request;
requested_permission_ =
Permission(request->GetOrigin(), request->GetResources());
}
- virtual void OnPermissionRequestCanceled(
- AwPermissionRequest* request) override{
+ void OnPermissionRequestCanceled(AwPermissionRequest* request) override {
canceled_permission_ =
Permission(request->GetOrigin(), request->GetResources());
}
@@ -129,7 +122,7 @@ class PermissionRequestHandlerTest : public testing::Test {
}
protected:
- virtual void SetUp() override {
+ void SetUp() override {
testing::Test::SetUp();
origin_ = GURL("http://www.google.com");
resources_ =
diff --git a/android_webview/native/permission/simple_permission_request.h b/android_webview/native/permission/simple_permission_request.h
index c232bdf..ba6b870 100644
--- a/android_webview/native/permission/simple_permission_request.h
+++ b/android_webview/native/permission/simple_permission_request.h
@@ -17,12 +17,12 @@ class SimplePermissionRequest : public AwPermissionRequestDelegate {
SimplePermissionRequest(const GURL& origin,
int64 resources,
const base::Callback<void(bool)>& callback);
- virtual ~SimplePermissionRequest();
+ ~SimplePermissionRequest() override;
// AwPermissionRequestDelegate implementation.
- virtual const GURL& GetOrigin() override;
- virtual int64 GetResources() override;
- virtual void NotifyRequestResult(bool allowed) override;
+ const GURL& GetOrigin() override;
+ int64 GetResources() override;
+ void NotifyRequestResult(bool allowed) override;
private:
const GURL origin_;