OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_ANDROID_WEB_CONTENTS_OBSERVER_PROXY_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_WEB_CONTENTS_OBSERVER_PROXY_H_ |
6 #define CONTENT_BROWSER_ANDROID_WEB_CONTENTS_OBSERVER_PROXY_H_ | 6 #define CONTENT_BROWSER_ANDROID_WEB_CONTENTS_OBSERVER_PROXY_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 void DocumentLoadedInFrame(RenderFrameHost* render_frame_host) override; | 65 void DocumentLoadedInFrame(RenderFrameHost* render_frame_host) override; |
66 void NavigationEntryCommitted( | 66 void NavigationEntryCommitted( |
67 const LoadCommittedDetails& load_details) override; | 67 const LoadCommittedDetails& load_details) override; |
68 void WebContentsDestroyed() override; | 68 void WebContentsDestroyed() override; |
69 void DidAttachInterstitialPage() override; | 69 void DidAttachInterstitialPage() override; |
70 void DidDetachInterstitialPage() override; | 70 void DidDetachInterstitialPage() override; |
71 void DidChangeThemeColor(SkColor color) override; | 71 void DidChangeThemeColor(SkColor color) override; |
72 void DidStartNavigationToPendingEntry( | 72 void DidStartNavigationToPendingEntry( |
73 const GURL& url, | 73 const GURL& url, |
74 NavigationController::ReloadType reload_type) override; | 74 NavigationController::ReloadType reload_type) override; |
75 void MediaSessionStateChanged(bool is_controllable, | 75 void MediaSessionStateChanged( |
76 bool is_suspended, | 76 bool is_controllable, |
77 const MediaMetadata& metadata) override; | 77 bool is_suspended, |
78 const base::Optional<MediaMetadata>& metadata) override; | |
dcheng
2016/09/06 21:11:16
The documentation for base::Optional specifically
mlamouri (slow - plz ping)
2016/09/07 08:55:53
FWIW, the gist of this recommendation is to avoid
Zhiqiang Zhang (Slow)
2016/09/07 10:45:06
I think passing `const base::Optional<T>&` is OK.
| |
78 void SetToBaseURLForDataURLIfNeeded(std::string* url); | 79 void SetToBaseURLForDataURLIfNeeded(std::string* url); |
79 | 80 |
80 void DidFailLoadInternal(bool is_provisional_load, | 81 void DidFailLoadInternal(bool is_provisional_load, |
81 bool is_main_frame, | 82 bool is_main_frame, |
82 int error_code, | 83 int error_code, |
83 const base::string16& description, | 84 const base::string16& description, |
84 const GURL& url, | 85 const GURL& url, |
85 bool was_ignored_by_handler); | 86 bool was_ignored_by_handler); |
86 | 87 |
87 base::android::ScopedJavaGlobalRef<jobject> java_observer_; | 88 base::android::ScopedJavaGlobalRef<jobject> java_observer_; |
88 GURL base_url_of_last_started_data_url_; | 89 GURL base_url_of_last_started_data_url_; |
89 | 90 |
90 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverProxy); | 91 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverProxy); |
91 }; | 92 }; |
92 | 93 |
93 bool RegisterWebContentsObserverProxy(JNIEnv* env); | 94 bool RegisterWebContentsObserverProxy(JNIEnv* env); |
94 } // namespace content | 95 } // namespace content |
95 | 96 |
96 #endif // CONTENT_BROWSER_ANDROID_WEB_CONTENTS_OBSERVER_PROXY_H_ | 97 #endif // CONTENT_BROWSER_ANDROID_WEB_CONTENTS_OBSERVER_PROXY_H_ |
OLD | NEW |