Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/browser/tab_contents/tab_contents.h

Issue 570048: Add zoom extension API (Closed)
Patch Set: Zoom extension API with docs and examples Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 6 #define CHROME_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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 674
675 // Updates history with the specified navigation. This is called by 675 // Updates history with the specified navigation. This is called by
676 // OnMsgNavigate to update history state. 676 // OnMsgNavigate to update history state.
677 void UpdateHistoryForNavigation( 677 void UpdateHistoryForNavigation(
678 scoped_refptr<history::HistoryAddPageArgs> add_page_args); 678 scoped_refptr<history::HistoryAddPageArgs> add_page_args);
679 679
680 // Sends the page title to the history service. This is called when we receive 680 // Sends the page title to the history service. This is called when we receive
681 // the page title and we know we want to update history. 681 // the page title and we know we want to update history.
682 void UpdateHistoryPageTitle(const NavigationEntry& entry); 682 void UpdateHistoryPageTitle(const NavigationEntry& entry);
683 683
684 // Sets the zoom level for this tab. Returns a request id that can
685 // be used to observe the corresponding ZOOM_LEVEL_CHANGED notification.
686 int SetZoomLevel(double zoom_level);
687
684 // Gets the zoom level for this tab. 688 // Gets the zoom level for this tab.
685 double GetZoomLevel() const; 689 double GetZoomLevel() const;
686 690
691 // Sets the zoom percent for this tab. Returns a request id that can
692 // be used to observe the corresponding ZOOM_LEVEL_CHANGED notification.
693 int SetZoomPercent(double zoom_percent);
694
687 // Gets the zoom percent for this tab. 695 // Gets the zoom percent for this tab.
688 int GetZoomPercent(bool* enable_increment, bool* enable_decrement); 696 double GetZoomPercent(bool* enable_increment, bool* enable_decrement);
689 697
690 // Shows a fade effect over this tab contents. Repeated calls will be ignored 698 // Shows a fade effect over this tab contents. Repeated calls will be ignored
691 // until the fade is canceled. If |animate| is true the fade should animate. 699 // until the fade is canceled. If |animate| is true the fade should animate.
692 void FadeForInstant(bool animate); 700 void FadeForInstant(bool animate);
693 701
694 // Immediately removes the fade. 702 // Immediately removes the fade.
695 void CancelInstantFade(); 703 void CancelInstantFade();
696 704
697 // Opens view-source tab for this contents. 705 // Opens view-source tab for this contents.
698 void ViewSource(); 706 void ViewSource();
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 ObserverList<TabContentsObserver> observers_; 1255 ObserverList<TabContentsObserver> observers_;
1248 1256
1249 // Content restrictions, used to disable print/copy etc based on content's 1257 // Content restrictions, used to disable print/copy etc based on content's
1250 // (full-page plugins for now only) permissions. 1258 // (full-page plugins for now only) permissions.
1251 int content_restrictions_; 1259 int content_restrictions_;
1252 1260
1253 DISALLOW_COPY_AND_ASSIGN(TabContents); 1261 DISALLOW_COPY_AND_ASSIGN(TabContents);
1254 }; 1262 };
1255 1263
1256 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 1264 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698