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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <functional> | 10 #include <functional> |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 bool page_scale_factor_is_one_; | 1388 bool page_scale_factor_is_one_; |
1389 | 1389 |
1390 // TextInputManager tracks the IME-related state for all the | 1390 // TextInputManager tracks the IME-related state for all the |
1391 // RenderWidgetHostViews on this WebContents. Only exists on the outermost | 1391 // RenderWidgetHostViews on this WebContents. Only exists on the outermost |
1392 // WebContents and is automatically destroyed when a WebContents becomes an | 1392 // WebContents and is automatically destroyed when a WebContents becomes an |
1393 // inner WebContents by attaching to an outer WebContents. Then the | 1393 // inner WebContents by attaching to an outer WebContents. Then the |
1394 // IME-related state for RenderWidgetHosts on the inner WebContents is tracked | 1394 // IME-related state for RenderWidgetHosts on the inner WebContents is tracked |
1395 // by the TextInputManager in the outer WebContents. | 1395 // by the TextInputManager in the outer WebContents. |
1396 std::unique_ptr<TextInputManager> text_input_manager_; | 1396 std::unique_ptr<TextInputManager> text_input_manager_; |
1397 | 1397 |
| 1398 // Stores the RenderWidgetHost that currently holds a mouse lock or nullptr if |
| 1399 // there's no RenderWidgetHost holding a lock. |
| 1400 RenderWidgetHostImpl* mouse_lock_widget_; |
| 1401 |
1398 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1402 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
1399 base::WeakPtrFactory<WebContentsImpl> weak_factory_; | 1403 base::WeakPtrFactory<WebContentsImpl> weak_factory_; |
1400 | 1404 |
1401 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1405 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1402 }; | 1406 }; |
1403 | 1407 |
1404 // Dangerous methods which should never be made part of the public API, so we | 1408 // Dangerous methods which should never be made part of the public API, so we |
1405 // grant their use only to an explicit friend list (c++ attorney/client idiom). | 1409 // grant their use only to an explicit friend list (c++ attorney/client idiom). |
1406 class CONTENT_EXPORT WebContentsImpl::FriendZone { | 1410 class CONTENT_EXPORT WebContentsImpl::FriendZone { |
1407 private: | 1411 private: |
1408 friend class TestNavigationObserver; | 1412 friend class TestNavigationObserver; |
1409 friend class WebContentsAddedObserver; | 1413 friend class WebContentsAddedObserver; |
1410 friend class ContentBrowserSanityChecker; | 1414 friend class ContentBrowserSanityChecker; |
1411 | 1415 |
1412 FriendZone(); // Not instantiable. | 1416 FriendZone(); // Not instantiable. |
1413 | 1417 |
1414 // Adds/removes a callback called on creation of each new WebContents. | 1418 // Adds/removes a callback called on creation of each new WebContents. |
1415 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1419 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1416 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1420 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1417 | 1421 |
1418 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1422 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1419 }; | 1423 }; |
1420 | 1424 |
1421 } // namespace content | 1425 } // namespace content |
1422 | 1426 |
1423 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1427 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |