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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/containers/scoped_ptr_hash_map.h" | 13 #include "base/containers/scoped_ptr_hash_map.h" |
| 14 #include "base/debug/stack_trace.h" |
14 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
17 #include "base/process/process.h" | 18 #include "base/process/process.h" |
18 #include "base/values.h" | 19 #include "base/values.h" |
19 #include "content/browser/frame_host/frame_tree.h" | 20 #include "content/browser/frame_host/frame_tree.h" |
20 #include "content/browser/frame_host/navigation_controller_delegate.h" | 21 #include "content/browser/frame_host/navigation_controller_delegate.h" |
21 #include "content/browser/frame_host/navigation_controller_impl.h" | 22 #include "content/browser/frame_host/navigation_controller_impl.h" |
22 #include "content/browser/frame_host/navigator_delegate.h" | 23 #include "content/browser/frame_host/navigator_delegate.h" |
23 #include "content/browser/frame_host/render_frame_host_delegate.h" | 24 #include "content/browser/frame_host/render_frame_host_delegate.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 void Find(int request_id, | 367 void Find(int request_id, |
367 const base::string16& search_text, | 368 const base::string16& search_text, |
368 const blink::WebFindOptions& options) override; | 369 const blink::WebFindOptions& options) override; |
369 void StopFinding(StopFindAction action) override; | 370 void StopFinding(StopFindAction action) override; |
370 void InsertCSS(const std::string& css) override; | 371 void InsertCSS(const std::string& css) override; |
371 bool WasRecentlyAudible() override; | 372 bool WasRecentlyAudible() override; |
372 void GetManifest(const GetManifestCallback& callback) override; | 373 void GetManifest(const GetManifestCallback& callback) override; |
373 void HasManifest(const HasManifestCallback& callback) override; | 374 void HasManifest(const HasManifestCallback& callback) override; |
374 void ExitFullscreen() override; | 375 void ExitFullscreen() override; |
375 void ResumeLoadingCreatedWebContents() override; | 376 void ResumeLoadingCreatedWebContents() override; |
| 377 base::debug::StackTrace stack_trace() override; |
376 #if defined(OS_ANDROID) | 378 #if defined(OS_ANDROID) |
377 void OnMediaSessionStateChanged(); | 379 void OnMediaSessionStateChanged(); |
378 void ResumeMediaSession() override; | 380 void ResumeMediaSession() override; |
379 void SuspendMediaSession() override; | 381 void SuspendMediaSession() override; |
380 void StopMediaSession() override; | 382 void StopMediaSession() override; |
381 #if !defined(USE_AURA) | 383 #if !defined(USE_AURA) |
382 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; | 384 base::android::ScopedJavaLocalRef<jobject> GetJavaWebContents() override; |
383 virtual WebContentsAndroid* GetWebContentsAndroid(); | 385 virtual WebContentsAndroid* GetWebContentsAndroid(); |
384 #endif // !USE_AURA | 386 #endif // !USE_AURA |
385 #elif defined(OS_MACOSX) | 387 #elif defined(OS_MACOSX) |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 // Manages all the media player and CDM managers and forwards IPCs to them. | 1324 // Manages all the media player and CDM managers and forwards IPCs to them. |
1323 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; | 1325 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; |
1324 #endif | 1326 #endif |
1325 | 1327 |
1326 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; | 1328 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; |
1327 | 1329 |
1328 PageImportanceSignals page_importance_signals_; | 1330 PageImportanceSignals page_importance_signals_; |
1329 | 1331 |
1330 bool page_scale_factor_is_one_; | 1332 bool page_scale_factor_is_one_; |
1331 | 1333 |
| 1334 // Temporary to track down http://crbug.com/538612 |
| 1335 base::debug::StackTrace stack_trace_; |
| 1336 |
1332 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1337 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
1333 | 1338 |
1334 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1339 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1335 }; | 1340 }; |
1336 | 1341 |
1337 // Dangerous methods which should never be made part of the public API, so we | 1342 // Dangerous methods which should never be made part of the public API, so we |
1338 // grant their use only to an explicit friend list (c++ attorney/client idiom). | 1343 // grant their use only to an explicit friend list (c++ attorney/client idiom). |
1339 class CONTENT_EXPORT WebContentsImpl::FriendZone { | 1344 class CONTENT_EXPORT WebContentsImpl::FriendZone { |
1340 private: | 1345 private: |
1341 friend class TestNavigationObserver; | 1346 friend class TestNavigationObserver; |
1342 friend class WebContentsAddedObserver; | 1347 friend class WebContentsAddedObserver; |
1343 friend class ContentBrowserSanityChecker; | 1348 friend class ContentBrowserSanityChecker; |
1344 | 1349 |
1345 FriendZone(); // Not instantiable. | 1350 FriendZone(); // Not instantiable. |
1346 | 1351 |
1347 // Adds/removes a callback called on creation of each new WebContents. | 1352 // Adds/removes a callback called on creation of each new WebContents. |
1348 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1353 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1349 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1354 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1350 | 1355 |
1351 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1356 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1352 }; | 1357 }; |
1353 | 1358 |
1354 } // namespace content | 1359 } // namespace content |
1355 | 1360 |
1356 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1361 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |