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 20 matching lines...) Expand all Loading... |
31 #endif | 31 #endif |
32 | 32 |
33 class InterstitialPageImpl; | 33 class InterstitialPageImpl; |
34 class LoadNotificationDetails; | 34 class LoadNotificationDetails; |
35 class RenderViewHost; | 35 class RenderViewHost; |
36 class SavePackage; | 36 class SavePackage; |
37 class SessionStorageNamespaceImpl; | 37 class SessionStorageNamespaceImpl; |
38 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; | 38 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; |
39 | 39 |
40 namespace content { | 40 namespace content { |
| 41 class ColorChooser; |
41 class DownloadItem; | 42 class DownloadItem; |
42 class SiteInstance; | 43 class SiteInstance; |
43 class JavaScriptDialogCreator; | 44 class JavaScriptDialogCreator; |
44 class WebContentsDelegate; | 45 class WebContentsDelegate; |
45 class WebContentsObserver; | 46 class WebContentsObserver; |
46 class WebContentsView; | 47 class WebContentsView; |
47 } | 48 } |
48 | 49 |
49 namespace webkit_glue { | 50 namespace webkit_glue { |
50 struct WebIntentData; | 51 struct WebIntentData; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 virtual void ViewSource() OVERRIDE; | 207 virtual void ViewSource() OVERRIDE; |
207 virtual void ViewFrameSource(const GURL& url, | 208 virtual void ViewFrameSource(const GURL& url, |
208 const std::string& content_state) OVERRIDE; | 209 const std::string& content_state) OVERRIDE; |
209 virtual int GetMinimumZoomPercent() const OVERRIDE; | 210 virtual int GetMinimumZoomPercent() const OVERRIDE; |
210 virtual int GetMaximumZoomPercent() const OVERRIDE; | 211 virtual int GetMaximumZoomPercent() const OVERRIDE; |
211 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 212 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
212 virtual int GetContentRestrictions() const OVERRIDE; | 213 virtual int GetContentRestrictions() const OVERRIDE; |
213 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; | 214 virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
214 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; | 215 virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; |
215 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; | 216 virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
| 217 virtual void DidChooseColorInColorChooser(int color_chooser_id, |
| 218 const SkColor&) OVERRIDE; |
| 219 virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE; |
216 | 220 |
217 // Implementation of PageNavigator. | 221 // Implementation of PageNavigator. |
218 virtual content::WebContents* OpenURL( | 222 virtual content::WebContents* OpenURL( |
219 const content::OpenURLParams& params) OVERRIDE; | 223 const content::OpenURLParams& params) OVERRIDE; |
220 | 224 |
221 // RenderViewHostDelegate ---------------------------------------------------- | 225 // RenderViewHostDelegate ---------------------------------------------------- |
222 | 226 |
223 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; | 227 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; |
224 virtual content::RenderViewHostDelegate::RendererManagement* | 228 virtual content::RenderViewHostDelegate::RendererManagement* |
225 GetRendererManagementDelegate() OVERRIDE; | 229 GetRendererManagementDelegate() OVERRIDE; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 void OnJSOutOfMemory(); | 426 void OnJSOutOfMemory(); |
423 | 427 |
424 void OnRegisterProtocolHandler(const std::string& protocol, | 428 void OnRegisterProtocolHandler(const std::string& protocol, |
425 const GURL& url, | 429 const GURL& url, |
426 const string16& title); | 430 const string16& title); |
427 void OnFindReply(int request_id, int number_of_matches, | 431 void OnFindReply(int request_id, int number_of_matches, |
428 const gfx::Rect& selection_rect, int active_match_ordinal, | 432 const gfx::Rect& selection_rect, int active_match_ordinal, |
429 bool final_update); | 433 bool final_update); |
430 void OnCrashedPlugin(const FilePath& plugin_path); | 434 void OnCrashedPlugin(const FilePath& plugin_path); |
431 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 435 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
| 436 void OnOpenColorChooser(int color_chooser_id, |
| 437 const SkColor& color); |
| 438 void OnEndColorChooser(int color_chooser_id); |
| 439 void OnSetSelectedColorInColorChooser(int color_chooser_id, |
| 440 const SkColor& color); |
432 | 441 |
433 // Changes the IsLoading state and notifies delegate as needed | 442 // Changes the IsLoading state and notifies delegate as needed |
434 // |details| is used to provide details on the load that just finished | 443 // |details| is used to provide details on the load that just finished |
435 // (but can be null if not applicable). Can be overridden. | 444 // (but can be null if not applicable). Can be overridden. |
436 void SetIsLoading(bool is_loading, | 445 void SetIsLoading(bool is_loading, |
437 LoadNotificationDetails* details); | 446 LoadNotificationDetails* details); |
438 | 447 |
439 // Called by derived classes to indicate that we're no longer waiting for a | 448 // Called by derived classes to indicate that we're no longer waiting for a |
440 // response. This won't actually update the throbber, but it will get picked | 449 // response. This won't actually update the throbber, but it will get picked |
441 // up at the next animation step if the throbber is going. | 450 // up at the next animation step if the throbber is going. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 // The intrinsic size of the page. | 650 // The intrinsic size of the page. |
642 gfx::Size preferred_size_; | 651 gfx::Size preferred_size_; |
643 | 652 |
644 // Content restrictions, used to disable print/copy etc based on content's | 653 // Content restrictions, used to disable print/copy etc based on content's |
645 // (full-page plugins for now only) permissions. | 654 // (full-page plugins for now only) permissions. |
646 int content_restrictions_; | 655 int content_restrictions_; |
647 | 656 |
648 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. | 657 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. |
649 content::ViewType view_type_; | 658 content::ViewType view_type_; |
650 | 659 |
| 660 content::ColorChooser* color_chooser_; |
| 661 |
651 DISALLOW_COPY_AND_ASSIGN(TabContents); | 662 DISALLOW_COPY_AND_ASSIGN(TabContents); |
652 }; | 663 }; |
653 | 664 |
654 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 665 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |