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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 // Manages all the media player and CDM managers and forwards IPCs to them. | 1334 // Manages all the media player and CDM managers and forwards IPCs to them. |
1333 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; | 1335 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; |
1334 #endif | 1336 #endif |
1335 | 1337 |
1336 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; | 1338 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; |
1337 | 1339 |
1338 PageImportanceSignals page_importance_signals_; | 1340 PageImportanceSignals page_importance_signals_; |
1339 | 1341 |
1340 bool page_scale_factor_is_one_; | 1342 bool page_scale_factor_is_one_; |
1341 | 1343 |
| 1344 // Temporary to track down http://crbug.com/538612 |
| 1345 base::debug::StackTrace stack_trace_; |
| 1346 |
1342 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1347 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
1343 | 1348 |
1344 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1349 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1345 }; | 1350 }; |
1346 | 1351 |
1347 // Dangerous methods which should never be made part of the public API, so we | 1352 // Dangerous methods which should never be made part of the public API, so we |
1348 // grant their use only to an explicit friend list (c++ attorney/client idiom). | 1353 // grant their use only to an explicit friend list (c++ attorney/client idiom). |
1349 class CONTENT_EXPORT WebContentsImpl::FriendZone { | 1354 class CONTENT_EXPORT WebContentsImpl::FriendZone { |
1350 private: | 1355 private: |
1351 friend class TestNavigationObserver; | 1356 friend class TestNavigationObserver; |
1352 friend class WebContentsAddedObserver; | 1357 friend class WebContentsAddedObserver; |
1353 friend class ContentBrowserSanityChecker; | 1358 friend class ContentBrowserSanityChecker; |
1354 | 1359 |
1355 FriendZone(); // Not instantiable. | 1360 FriendZone(); // Not instantiable. |
1356 | 1361 |
1357 // Adds/removes a callback called on creation of each new WebContents. | 1362 // Adds/removes a callback called on creation of each new WebContents. |
1358 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1363 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1359 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1364 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1360 | 1365 |
1361 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1366 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1362 }; | 1367 }; |
1363 | 1368 |
1364 } // namespace content | 1369 } // namespace content |
1365 | 1370 |
1366 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1371 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |