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_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 // bombing), see DownloadRequestLimiter for details. | 483 // bombing), see DownloadRequestLimiter for details. |
484 virtual void UserGestureDone() = 0; | 484 virtual void UserGestureDone() = 0; |
485 | 485 |
486 // Indicates if this tab was explicitly closed by the user (control-w, close | 486 // Indicates if this tab was explicitly closed by the user (control-w, close |
487 // tab menu item...). This is false for actions that indirectly close the tab, | 487 // tab menu item...). This is false for actions that indirectly close the tab, |
488 // such as closing the window. The setter is maintained by TabStripModel, and | 488 // such as closing the window. The setter is maintained by TabStripModel, and |
489 // the getter only useful from within TAB_CLOSED notification | 489 // the getter only useful from within TAB_CLOSED notification |
490 virtual void SetClosedByUserGesture(bool value) = 0; | 490 virtual void SetClosedByUserGesture(bool value) = 0; |
491 virtual bool GetClosedByUserGesture() const = 0; | 491 virtual bool GetClosedByUserGesture() const = 0; |
492 | 492 |
493 // Gets the zoom level for this tab. | |
494 virtual double GetZoomLevel() const = 0; | |
495 | |
496 // Gets the zoom percent for this tab. | 493 // Gets the zoom percent for this tab. |
497 virtual int GetZoomPercent(bool* enable_increment, | 494 virtual int GetZoomPercent(bool* enable_increment, |
498 bool* enable_decrement) const = 0; | 495 bool* enable_decrement) const = 0; |
499 | 496 |
500 // Opens view-source tab for this contents. | 497 // Opens view-source tab for this contents. |
501 virtual void ViewSource() = 0; | 498 virtual void ViewSource() = 0; |
502 | 499 |
503 virtual void ViewFrameSource(const GURL& url, | 500 virtual void ViewFrameSource(const GURL& url, |
504 const PageState& page_state)= 0; | 501 const PageState& page_state)= 0; |
505 | 502 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 bool is_favicon, | 550 bool is_favicon, |
554 uint32_t max_bitmap_size, | 551 uint32_t max_bitmap_size, |
555 const ImageDownloadCallback& callback) = 0; | 552 const ImageDownloadCallback& callback) = 0; |
556 | 553 |
557 // Returns true if the WebContents is responsible for displaying a subframe | 554 // Returns true if the WebContents is responsible for displaying a subframe |
558 // in a different process from its parent page. | 555 // in a different process from its parent page. |
559 // TODO: this doesn't really belong here. With site isolation, this should be | 556 // TODO: this doesn't really belong here. With site isolation, this should be |
560 // removed since we can then embed iframes in different processes. | 557 // removed since we can then embed iframes in different processes. |
561 virtual bool IsSubframe() const = 0; | 558 virtual bool IsSubframe() const = 0; |
562 | 559 |
563 // Sets the zoom level for the current page and all BrowserPluginGuests | |
564 // within the page. | |
565 virtual void SetZoomLevel(double level) = 0; | |
566 | |
567 // Finds text on a page. | 560 // Finds text on a page. |
568 virtual void Find(int request_id, | 561 virtual void Find(int request_id, |
569 const base::string16& search_text, | 562 const base::string16& search_text, |
570 const blink::WebFindOptions& options) = 0; | 563 const blink::WebFindOptions& options) = 0; |
571 | 564 |
572 // Notifies the renderer that the user has closed the FindInPage window | 565 // Notifies the renderer that the user has closed the FindInPage window |
573 // (and what action to take regarding the selection). | 566 // (and what action to take regarding the selection). |
574 virtual void StopFinding(StopFindAction action) = 0; | 567 virtual void StopFinding(StopFindAction action) = 0; |
575 | 568 |
576 // Requests the renderer to insert CSS into the main frame's document. | 569 // Requests the renderer to insert CSS into the main frame's document. |
(...skipping 25 matching lines...) Expand all Loading... |
602 | 595 |
603 private: | 596 private: |
604 // This interface should only be implemented inside content. | 597 // This interface should only be implemented inside content. |
605 friend class WebContentsImpl; | 598 friend class WebContentsImpl; |
606 WebContents() {} | 599 WebContents() {} |
607 }; | 600 }; |
608 | 601 |
609 } // namespace content | 602 } // namespace content |
610 | 603 |
611 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 604 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |