Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_TAB_CONTENTS_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 | 502 |
| 503 // Add and remove observers for page navigation notifications. Adding or | 503 // Add and remove observers for page navigation notifications. Adding or |
| 504 // removing multiple times has no effect. The order in which notifications | 504 // removing multiple times has no effect. The order in which notifications |
| 505 // are sent to observers is undefined. Clients must be sure to remove the | 505 // are sent to observers is undefined. Clients must be sure to remove the |
| 506 // observer before they go away. | 506 // observer before they go away. |
| 507 void AddObserver(TabContentsObserver* observer); | 507 void AddObserver(TabContentsObserver* observer); |
| 508 void RemoveObserver(TabContentsObserver* observer); | 508 void RemoveObserver(TabContentsObserver* observer); |
| 509 | 509 |
| 510 // From RenderViewHostDelegate. | 510 // From RenderViewHostDelegate. |
| 511 virtual bool OnMessageReceived(const IPC::Message& message); | 511 virtual bool OnMessageReceived(const IPC::Message& message); |
| 512 virtual void RunFileChooser(RenderViewHost* render_view_host, | |
|
jam
2011/08/24 22:42:57
nit: please put this in order at the bottom of the
ananta
2011/08/24 22:58:39
Moved both methods to the bottom with other RVHD o
| |
| 513 const ViewHostMsg_RunFileChooser_Params& params); | |
| 514 | |
| 512 | 515 |
| 513 private: | 516 private: |
| 514 friend class NavigationController; | 517 friend class NavigationController; |
| 515 // Used to access the child_windows_ (ConstrainedWindowList) for testing | 518 // Used to access the child_windows_ (ConstrainedWindowList) for testing |
| 516 // automation purposes. | 519 // automation purposes. |
| 517 friend class TestingAutomationProvider; | 520 friend class TestingAutomationProvider; |
| 518 | 521 |
| 519 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, NoJSMessageOnInterstitials); | 522 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, NoJSMessageOnInterstitials); |
| 520 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, UpdateTitle); | 523 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, UpdateTitle); |
| 521 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, CrossSiteCantPreemptAfterUnload); | 524 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, CrossSiteCantPreemptAfterUnload); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 562 void OnDidRunInsecureContent(const std::string& security_origin, | 565 void OnDidRunInsecureContent(const std::string& security_origin, |
| 563 const GURL& target_url); | 566 const GURL& target_url); |
| 564 void OnDocumentLoadedInFrame(int64 frame_id); | 567 void OnDocumentLoadedInFrame(int64 frame_id); |
| 565 void OnDidFinishLoad(int64 frame_id); | 568 void OnDidFinishLoad(int64 frame_id); |
| 566 void OnUpdateContentRestrictions(int restrictions); | 569 void OnUpdateContentRestrictions(int restrictions); |
| 567 void OnGoToEntryAtOffset(int offset); | 570 void OnGoToEntryAtOffset(int offset); |
| 568 void OnUpdateZoomLimits(int minimum_percent, | 571 void OnUpdateZoomLimits(int minimum_percent, |
| 569 int maximum_percent, | 572 int maximum_percent, |
| 570 bool remember); | 573 bool remember); |
| 571 void OnFocusedNodeChanged(bool is_editable_node); | 574 void OnFocusedNodeChanged(bool is_editable_node); |
| 572 // Called when a file selection is to be done. | |
| 573 void OnRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); | |
| 574 void OnEnumerateDirectory(int request_id, const FilePath& path); | 575 void OnEnumerateDirectory(int request_id, const FilePath& path); |
| 575 | 576 |
| 576 // Changes the IsLoading state and notifies delegate as needed | 577 // Changes the IsLoading state and notifies delegate as needed |
| 577 // |details| is used to provide details on the load that just finished | 578 // |details| is used to provide details on the load that just finished |
| 578 // (but can be null if not applicable). Can be overridden. | 579 // (but can be null if not applicable). Can be overridden. |
| 579 void SetIsLoading(bool is_loading, | 580 void SetIsLoading(bool is_loading, |
| 580 LoadNotificationDetails* details); | 581 LoadNotificationDetails* details); |
| 581 | 582 |
| 582 // Called by derived classes to indicate that we're no longer waiting for a | 583 // Called by derived classes to indicate that we're no longer waiting for a |
| 583 // response. This won't actually update the throbber, but it will get picked | 584 // response. This won't actually update the throbber, but it will get picked |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 874 ObserverList<TabContentsObserver> observers_; | 875 ObserverList<TabContentsObserver> observers_; |
| 875 | 876 |
| 876 // Content restrictions, used to disable print/copy etc based on content's | 877 // Content restrictions, used to disable print/copy etc based on content's |
| 877 // (full-page plugins for now only) permissions. | 878 // (full-page plugins for now only) permissions. |
| 878 int content_restrictions_; | 879 int content_restrictions_; |
| 879 | 880 |
| 880 DISALLOW_COPY_AND_ASSIGN(TabContents); | 881 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 881 }; | 882 }; |
| 882 | 883 |
| 883 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 884 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |