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_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 18 matching lines...) Expand all Loading... |
29 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
30 #include "base/win/scoped_handle.h" | 30 #include "base/win/scoped_handle.h" |
31 #endif | 31 #endif |
32 | 32 |
33 class InterstitialPageImpl; | 33 class InterstitialPageImpl; |
34 class SavePackage; | 34 class SavePackage; |
35 class SessionStorageNamespaceImpl; | 35 class SessionStorageNamespaceImpl; |
36 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; | 36 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; |
37 | 37 |
38 namespace content { | 38 namespace content { |
| 39 class ColorChooser; |
39 class DownloadItem; | 40 class DownloadItem; |
40 class JavaScriptDialogCreator; | 41 class JavaScriptDialogCreator; |
41 class RenderViewHost; | 42 class RenderViewHost; |
42 class RenderViewHostImpl; | 43 class RenderViewHostImpl; |
43 class SiteInstance; | 44 class SiteInstance; |
44 class WebContentsDelegate; | 45 class WebContentsDelegate; |
45 class WebContentsObserver; | 46 class WebContentsObserver; |
46 class WebContentsView; | 47 class WebContentsView; |
47 struct LoadNotificationDetails; | 48 struct LoadNotificationDetails; |
48 } | 49 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 virtual void ViewFrameSource(const GURL& url, | 217 virtual void ViewFrameSource(const GURL& url, |
217 const std::string& content_state) OVERRIDE; | 218 const std::string& content_state) OVERRIDE; |
218 virtual int GetMinimumZoomPercent() const OVERRIDE; | 219 virtual int GetMinimumZoomPercent() const OVERRIDE; |
219 virtual int GetMaximumZoomPercent() const OVERRIDE; | 220 virtual int GetMaximumZoomPercent() const OVERRIDE; |
220 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 221 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
221 virtual int GetContentRestrictions() const OVERRIDE; | 222 virtual int GetContentRestrictions() const OVERRIDE; |
222 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; | 223 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
223 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; | 224 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; |
224 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 225 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
225 virtual bool HasOpener() const OVERRIDE; | 226 virtual bool HasOpener() const OVERRIDE; |
| 227 virtual void DidChooseColorInColorChooser(int color_chooser_id, |
| 228 const SkColor&) OVERRIDE; |
| 229 virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE; |
226 | 230 |
227 // Implementation of PageNavigator. | 231 // Implementation of PageNavigator. |
228 virtual content::WebContents* OpenURL( | 232 virtual content::WebContents* OpenURL( |
229 const content::OpenURLParams& params) OVERRIDE; | 233 const content::OpenURLParams& params) OVERRIDE; |
230 | 234 |
231 // RenderViewHostDelegate ---------------------------------------------------- | 235 // RenderViewHostDelegate ---------------------------------------------------- |
232 | 236 |
233 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; | 237 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; |
234 virtual content::RenderViewHostDelegate::RendererManagement* | 238 virtual content::RenderViewHostDelegate::RendererManagement* |
235 GetRendererManagementDelegate() OVERRIDE; | 239 GetRendererManagementDelegate() OVERRIDE; |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 void OnJSOutOfMemory(); | 443 void OnJSOutOfMemory(); |
440 | 444 |
441 void OnRegisterProtocolHandler(const std::string& protocol, | 445 void OnRegisterProtocolHandler(const std::string& protocol, |
442 const GURL& url, | 446 const GURL& url, |
443 const string16& title); | 447 const string16& title); |
444 void OnFindReply(int request_id, int number_of_matches, | 448 void OnFindReply(int request_id, int number_of_matches, |
445 const gfx::Rect& selection_rect, int active_match_ordinal, | 449 const gfx::Rect& selection_rect, int active_match_ordinal, |
446 bool final_update); | 450 bool final_update); |
447 void OnCrashedPlugin(const FilePath& plugin_path); | 451 void OnCrashedPlugin(const FilePath& plugin_path); |
448 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 452 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
| 453 void OnOpenColorChooser(int color_chooser_id, |
| 454 const SkColor& color); |
| 455 void OnEndColorChooser(int color_chooser_id); |
| 456 void OnSetSelectedColorInColorChooser(int color_chooser_id, |
| 457 const SkColor& color); |
449 | 458 |
450 // Changes the IsLoading state and notifies delegate as needed | 459 // Changes the IsLoading state and notifies delegate as needed |
451 // |details| is used to provide details on the load that just finished | 460 // |details| is used to provide details on the load that just finished |
452 // (but can be null if not applicable). Can be overridden. | 461 // (but can be null if not applicable). Can be overridden. |
453 void SetIsLoading(bool is_loading, | 462 void SetIsLoading(bool is_loading, |
454 content::LoadNotificationDetails* details); | 463 content::LoadNotificationDetails* details); |
455 | 464 |
456 // Called by derived classes to indicate that we're no longer waiting for a | 465 // Called by derived classes to indicate that we're no longer waiting for a |
457 // response. This won't actually update the throbber, but it will get picked | 466 // response. This won't actually update the throbber, but it will get picked |
458 // up at the next animation step if the throbber is going. | 467 // up at the next animation step if the throbber is going. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 // Content restrictions, used to disable print/copy etc based on content's | 672 // Content restrictions, used to disable print/copy etc based on content's |
664 // (full-page plugins for now only) permissions. | 673 // (full-page plugins for now only) permissions. |
665 int content_restrictions_; | 674 int content_restrictions_; |
666 | 675 |
667 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 676 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
668 content::ViewType view_type_; | 677 content::ViewType view_type_; |
669 | 678 |
670 // Is there an opener associated with this? | 679 // Is there an opener associated with this? |
671 bool has_opener_; | 680 bool has_opener_; |
672 | 681 |
| 682 // Color chooser that was opened by this tab. |
| 683 content::ColorChooser* color_chooser_; |
| 684 |
673 DISALLOW_COPY_AND_ASSIGN(TabContents); | 685 DISALLOW_COPY_AND_ASSIGN(TabContents); |
674 }; | 686 }; |
675 | 687 |
676 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 688 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |