diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 19:47:51 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 19:47:51 +0000 |
commit | f11695a0b2eeb605fa9f21bcf5c991ef1bcc765a (patch) | |
tree | 06a498cba9bd9bdc841498f79f2badcb72454b85 | |
parent | 81e6378c98d0e69339302527eb1de4735d1e2c3f (diff) | |
download | chromium_src-f11695a0b2eeb605fa9f21bcf5c991ef1bcc765a.zip chromium_src-f11695a0b2eeb605fa9f21bcf5c991ef1bcc765a.tar.gz chromium_src-f11695a0b2eeb605fa9f21bcf5c991ef1bcc765a.tar.bz2 |
Add "stop" image to project. Clean up project so app/theme is a proper group and its children could be relative to it rather than their grandparent. Plumb loading status into Mac controllers. Add more loading status info to stub TabContents. Make browser window a little taller and wider so NTP didn't show scrollbars.
Review URL: http://codereview.chromium.org/31017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10621 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/nibs/English.lproj/BrowserWindow.xib | 24 | ||||
-rw-r--r-- | chrome/app/nibs/English.lproj/TabContents.xib | 32 | ||||
-rw-r--r-- | chrome/app/theme/stop.pdf | bin | 0 -> 2291 bytes | |||
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa.mm | 2 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_controller.h | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_controller.mm | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.h | 7 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.mm | 11 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.h | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.mm | 10 | ||||
-rw-r--r-- | chrome/chrome.gyp | 1 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 24 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 21 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 4 |
14 files changed, 108 insertions, 38 deletions
diff --git a/chrome/app/nibs/English.lproj/BrowserWindow.xib b/chrome/app/nibs/English.lproj/BrowserWindow.xib index 9dd9841..42a88a2 100644 --- a/chrome/app/nibs/English.lproj/BrowserWindow.xib +++ b/chrome/app/nibs/English.lproj/BrowserWindow.xib @@ -2,12 +2,13 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">9G55</string> + <string key="IBDocument.SystemVersion">9F33</string> <string key="IBDocument.InterfaceBuilderVersion">677</string> - <string key="IBDocument.AppKitVersion">949.43</string> - <string key="IBDocument.HIToolboxVersion">353.00</string> + <string key="IBDocument.AppKitVersion">949.34</string> + <string key="IBDocument.HIToolboxVersion">352.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> + <integer value="1"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -36,14 +37,14 @@ <object class="NSWindowTemplate" id="1005"> <int key="NSWindowStyleMask">4359</int> <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{60, 229}, {720, 578}}</string> + <string key="NSWindowRect">{{60, 229}, {750, 600}}</string> <int key="NSWTFlags">536870912</int> <string key="NSWindowTitle"/> <string key="NSWindowClass">NSWindow</string> <nil key="NSViewClass"/> <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <object class="NSView" key="NSWindowView" id="1006"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -55,11 +56,11 @@ <object class="NSView" id="734052543"> <reference key="NSNextResponder" ref="332491870"/> <int key="NSvFlags">256</int> - <string key="NSFrameSize">{720, 564}</string> + <string key="NSFrameSize">{750, 586}</string> <reference key="NSSuperview" ref="332491870"/> </object> </object> - <string key="NSFrameSize">{720, 564}</string> + <string key="NSFrameSize">{750, 586}</string> <reference key="NSSuperview" ref="1006"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> @@ -92,7 +93,8 @@ <bool key="NSTransparent">NO</bool> </object> </object> - <string key="NSFrameSize">{720, 578}</string> + <string key="NSFrameSize">{750, 600}</string> + <reference key="NSSuperview"/> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> @@ -231,9 +233,9 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{136, 278}, {720, 578}}</string> + <string>{{136, 256}, {750, 600}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{136, 278}, {720, 578}}</string> + <string>{{136, 256}, {750, 600}}</string> <boolean value="NO"/> <string>{196, 240}</string> <string>{{357, 418}, {480, 270}}</string> @@ -297,7 +299,7 @@ </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> - <string key="minorKey">browser/browser_window_controller.h</string> + <string key="minorKey">browser/cocoa/browser_window_controller.h</string> </object> </object> <object class="IBPartialClassDescription"> diff --git a/chrome/app/nibs/English.lproj/TabContents.xib b/chrome/app/nibs/English.lproj/TabContents.xib index 3d6bf8a..217660b 100644 --- a/chrome/app/nibs/English.lproj/TabContents.xib +++ b/chrome/app/nibs/English.lproj/TabContents.xib @@ -8,7 +8,7 @@ <string key="IBDocument.HIToolboxVersion">352.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="94"/> + <integer value="164"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -431,14 +431,6 @@ </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">reloadStopButton_</string> - <reference key="source" ref="326691890"/> - <reference key="destination" ref="1046981093"/> - </object> - <int key="connectionID">167</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> <string key="label">starButton_</string> <reference key="source" ref="326691890"/> <reference key="destination" ref="574811940"/> @@ -461,6 +453,22 @@ </object> <int key="connectionID">176</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">reloadButton_</string> + <reference key="source" ref="326691890"/> + <reference key="destination" ref="1046981093"/> + </object> + <int key="connectionID">177</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">goButton_</string> + <reference key="source" ref="326691890"/> + <reference key="destination" ref="742185090"/> + </object> + <int key="connectionID">178</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -735,7 +743,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">176</int> + <int key="maxID">178</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -774,9 +782,10 @@ <string>backButton_</string> <string>contentsBox_</string> <string>forwardButton_</string> + <string>goButton_</string> <string>growBox_</string> <string>locationBar_</string> - <string>reloadStopButton_</string> + <string>reloadButton_</string> <string>starButton_</string> </object> <object class="NSMutableArray" key="dict.values"> @@ -784,6 +793,7 @@ <string>NSButton</string> <string>NSBox</string> <string>NSButton</string> + <string>NSButton</string> <string>GrowBoxView</string> <string>NSTextField</string> <string>NSButton</string> diff --git a/chrome/app/theme/stop.pdf b/chrome/app/theme/stop.pdf Binary files differnew file mode 100644 index 0000000..a03f612 --- /dev/null +++ b/chrome/app/theme/stop.pdf diff --git a/chrome/browser/cocoa/browser_window_cocoa.mm b/chrome/browser/cocoa/browser_window_cocoa.mm index 554619a..9334671 100644 --- a/chrome/browser/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/cocoa/browser_window_cocoa.mm @@ -114,7 +114,7 @@ void BrowserWindowCocoa::SetFocusToLocationBar() { } void BrowserWindowCocoa::UpdateStopGoState(bool is_loading) { - NOTIMPLEMENTED(); + [controller_ setIsLoading:is_loading ? YES : NO]; } void BrowserWindowCocoa::UpdateToolbar(TabContents* contents, diff --git a/chrome/browser/cocoa/browser_window_controller.h b/chrome/browser/cocoa/browser_window_controller.h index 0e6b15f..e333758 100644 --- a/chrome/browser/cocoa/browser_window_controller.h +++ b/chrome/browser/cocoa/browser_window_controller.h @@ -61,6 +61,9 @@ class TabContents; // in the coordinate system of the content area of the currently selected tab. - (NSRect)selectedTabGrowBoxRect; +// Called to tell the selected tab to update its loading state. +- (void)setIsLoading:(BOOL)isLoading; + @end #endif // CHROME_BROWSER_BROWSER_WINDOW_CONTROLLER_H_ diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm index dafb98b..76219e2 100644 --- a/chrome/browser/cocoa/browser_window_controller.mm +++ b/chrome/browser/cocoa/browser_window_controller.mm @@ -154,4 +154,8 @@ selectedTabGrowBoxRect]; } +- (void)setIsLoading:(BOOL)isLoading { + [tabStripController_ setIsLoading:isLoading]; +} + @end diff --git a/chrome/browser/cocoa/tab_contents_controller.h b/chrome/browser/cocoa/tab_contents_controller.h index 86f6b0c..de58708 100644 --- a/chrome/browser/cocoa/tab_contents_controller.h +++ b/chrome/browser/cocoa/tab_contents_controller.h @@ -35,8 +35,9 @@ class ToolbarModel; ToolbarModel* toolbarModel_; // weak, one per window IBOutlet NSButton* backButton_; IBOutlet NSButton* forwardButton_; - IBOutlet NSButton* reloadStopButton_; + IBOutlet NSButton* reloadButton_; IBOutlet NSButton* starButton_; + IBOutlet NSButton* goButton_; IBOutlet NSTextField* locationBar_; IBOutlet NSBox* contentsBox_; IBOutlet GrowBoxView* growBox_; @@ -78,6 +79,10 @@ class ToolbarModel; // in the coordinate system of the content area of this tab. - (NSRect)growBoxRect; +// Called to update the loading state. Handles updating the go/stop button +// state. +- (void)setIsLoading:(BOOL)isLoading; + @end #endif // CHROME_BROWSER_COCOA_TAB_COTNENTS_CONTROLLER_H_ diff --git a/chrome/browser/cocoa/tab_contents_controller.mm b/chrome/browser/cocoa/tab_contents_controller.mm index bc0677b..0700341 100644 --- a/chrome/browser/cocoa/tab_contents_controller.mm +++ b/chrome/browser/cocoa/tab_contents_controller.mm @@ -160,7 +160,7 @@ class LocationBarBridge : public LocationBar { [backButton_ setEnabled:commands_->IsCommandEnabled(IDC_BACK) ? YES : NO]; [forwardButton_ setEnabled:commands_->IsCommandEnabled(IDC_FORWARD) ? YES : NO]; - [reloadStopButton_ + [reloadButton_ setEnabled:commands_->IsCommandEnabled(IDC_RELOAD) ? YES : NO]; [starButton_ setEnabled:commands_->IsCommandEnabled(IDC_STAR) ? YES : NO]; } @@ -214,7 +214,7 @@ class LocationBarBridge : public LocationBar { // entire bottom corner. localGrowBox.origin.y = 0; // Convert to the content view's coordinates. - localGrowBox = [contentView convertRect:localGrowBox + localGrowBox = [contentView convertRect:localGrowBox fromView:[self view]]; // Flip the rect in view coordinates localGrowBox.origin.y = @@ -224,6 +224,13 @@ class LocationBarBridge : public LocationBar { return localGrowBox; } +- (void)setIsLoading:(BOOL)isLoading { + NSString* imageName = @"go"; + if (isLoading) + imageName = @"stop"; + [goButton_ setImage:[NSImage imageNamed:imageName]]; +} + @end //-------------------------------------------------------------------------- diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h index 160566a..968b9ec 100644 --- a/chrome/browser/cocoa/tab_strip_controller.h +++ b/chrome/browser/cocoa/tab_strip_controller.h @@ -66,6 +66,9 @@ class ToolbarModel; // in the coordinate system of the content area of the currently selected tab. - (NSRect)selectedTabGrowBoxRect; +// Called to tell the selected tab to update its loading state. +- (void)setIsLoading:(BOOL)isLoading; + @end #endif // CHROME_BROWSER_COCOA_TAB_STRIP_CONTROLLER_H_ diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm index 7dccb26..98abf86 100644 --- a/chrome/browser/cocoa/tab_strip_controller.mm +++ b/chrome/browser/cocoa/tab_strip_controller.mm @@ -343,6 +343,16 @@ class TabStripBridge : public TabStripModelObserver { return [selectedController growBoxRect]; } +// Called to tell the selected tab to update its loading state. +- (void)setIsLoading:(BOOL)isLoading { + // TODO(pinkerton): update the favicon on the selected tab view to/from + // a spinner? + + TabContentsController* selectedController = + [tabControllerArray_ objectAtIndex:tabModel_->selected_index()]; + [selectedController setIsLoading:isLoading]; +} + @end //-------------------------------------------------------------------------- diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 5313a3f..a9562b4 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1355,6 +1355,7 @@ 'app/theme/sadtab.png', 'app/theme/star.pdf', 'app/theme/starred.pdf', + 'app/theme/stop.pdf', 'app/app-Info.plist', ], # TODO(mark): Come up with a fancier way to do this. It should only diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index 3d3fa1a..274f8ae 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -623,6 +623,7 @@ E4BD55140F55AB3700591DFA /* text_elider.cc in Sources */ = {isa = PBXBuildFile; fileRef = E4BD55120F55AB3700591DFA /* text_elider.cc */; }; E4BD55490F55AE6900591DFA /* chrome_font_mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4BD55480F55AE6900591DFA /* chrome_font_mac.mm */; }; E4BD55C90F55BBC500591DFA /* chrome_font_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = E4BD55C80F55BBC500591DFA /* chrome_font_unittest.cc */; }; + E4BD5A4E0F58734C00591DFA /* stop.pdf in Resources */ = {isa = PBXBuildFile; fileRef = E4BD5A4D0F58734C00591DFA /* stop.pdf */; }; E4DCDB9D0F4091C00084059A /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4DCDB9C0F4091BF0084059A /* ApplicationServices.framework */; }; E4DCDC8F0F4091F30084059A /* libWebKitSystemInterfaceLeopard.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4DCDC8E0F4091F30084059A /* libWebKitSystemInterfaceLeopard.a */; }; E4DCDC900F40929C0084059A /* libglue.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 826850180F2FC82E009F6555 /* libglue.a */; }; @@ -2535,7 +2536,7 @@ 7849CCC221723C1BC14D6384 /* history_publisher_none.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = history_publisher_none.cc; sourceTree = "<group>"; }; 7F10273789D2D71620792788 /* dev_tools_messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dev_tools_messages.h; sourceTree = "<group>"; }; 8104B4AFD95DCA06B2F37551 /* chrome_paths_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chrome_paths_internal.h; sourceTree = "<group>"; }; - 824FC14E0F44C56A000299E5 /* sadtab.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = sadtab.png; path = theme/sadtab.png; sourceTree = "<group>"; }; + 824FC14E0F44C56A000299E5 /* sadtab.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sadtab.png; sourceTree = "<group>"; }; 824FC1540F44C59C000299E5 /* sad_tab_view.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = sad_tab_view.mm; sourceTree = "<group>"; }; 824FC1550F44C59C000299E5 /* sad_tab_view.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sad_tab_view.h; sourceTree = "<group>"; }; 82684C5F0F2FAE68009F6555 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; @@ -2794,7 +2795,7 @@ E43A79F10F1D192000ABD5D1 /* westResizeCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = westResizeCursor.png; sourceTree = "<group>"; }; E43A79F20F1D192000ABD5D1 /* zoomInCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoomInCursor.png; sourceTree = "<group>"; }; E43A79F30F1D192000ABD5D1 /* zoomOutCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zoomOutCursor.png; sourceTree = "<group>"; }; - E43D096D0F44C7BA003F39CA /* starred.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = starred.pdf; path = theme/starred.pdf; sourceTree = "<group>"; }; + E43D096D0F44C7BA003F39CA /* starred.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = starred.pdf; sourceTree = "<group>"; }; E45060E40EE87B86003BE099 /* Chromium.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Chromium.app; sourceTree = BUILT_PRODUCTS_DIR; }; E45060E60EE87B86003BE099 /* app-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "app-Info.plist"; sourceTree = "<group>"; }; E45060F10EE87D41003BE099 /* chrome_exe_main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = chrome_exe_main.mm; sourceTree = "<group>"; }; @@ -2847,17 +2848,17 @@ E46C4ED20F27A94100B393B8 /* command_updater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = command_updater.h; sourceTree = "<group>"; }; E46C4ED30F27A94100B393B8 /* command_updater.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = command_updater.cc; sourceTree = "<group>"; }; E46C4EF20F27A9B000B393B8 /* command_updater_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = command_updater_unittest.cc; sourceTree = "<group>"; }; - E46C504F0F291C0600B393B8 /* star.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = star.pdf; path = theme/star.pdf; sourceTree = "<group>"; }; - E46C50510F291C0E00B393B8 /* back.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = back.pdf; path = theme/back.pdf; sourceTree = "<group>"; }; - E46C50530F291C1E00B393B8 /* forward.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = forward.pdf; path = theme/forward.pdf; sourceTree = "<group>"; }; - E46C50540F291C1E00B393B8 /* reload.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = reload.pdf; path = theme/reload.pdf; sourceTree = "<group>"; }; - E46C50570F291C3B00B393B8 /* newtab.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = newtab.pdf; path = theme/newtab.pdf; sourceTree = "<group>"; }; + E46C504F0F291C0600B393B8 /* star.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = star.pdf; sourceTree = "<group>"; }; + E46C50510F291C0E00B393B8 /* back.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = back.pdf; sourceTree = "<group>"; }; + E46C50530F291C1E00B393B8 /* forward.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = forward.pdf; sourceTree = "<group>"; }; + E46C50540F291C1E00B393B8 /* reload.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = reload.pdf; sourceTree = "<group>"; }; + E46C50570F291C3B00B393B8 /* newtab.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = newtab.pdf; sourceTree = "<group>"; }; E46C50D70F292EAA00B393B8 /* tab_cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tab_cell.h; sourceTree = "<group>"; }; E46C50D80F292EAA00B393B8 /* tab_cell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = tab_cell.mm; sourceTree = "<group>"; }; E46C50E80F2A11FC00B393B8 /* tab_contents_controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tab_contents_controller.h; sourceTree = "<group>"; }; E46C50E90F2A11FC00B393B8 /* tab_contents_controller.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = tab_contents_controller.mm; sourceTree = "<group>"; }; E46C50EE0F2A12DC00B393B8 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TabContents.xib; sourceTree = "<group>"; }; - E46C51230F2A14A300B393B8 /* go.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = go.pdf; path = theme/go.pdf; sourceTree = "<group>"; }; + E46C51230F2A14A300B393B8 /* go.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = go.pdf; sourceTree = "<group>"; }; E46C51620F2A1DAB00B393B8 /* toolbar_view.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = toolbar_view.h; sourceTree = "<group>"; }; E46C51630F2A1DAB00B393B8 /* toolbar_view.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = toolbar_view.mm; sourceTree = "<group>"; }; E46C51980F2A20CC00B393B8 /* toolbar_button_cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = toolbar_button_cell.h; sourceTree = "<group>"; }; @@ -2911,7 +2912,7 @@ E48FB9750EC4EA270052B72B /* url_request_slow_download_job.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = url_request_slow_download_job.h; sourceTree = "<group>"; }; E4A3EB110F4EFCF400596CC2 /* grow_box_view.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = grow_box_view.h; sourceTree = "<group>"; }; E4A3EB120F4EFCF400596CC2 /* grow_box_view.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = grow_box_view.m; sourceTree = "<group>"; }; - E4A3EB380F4EFF4D00596CC2 /* grow_box.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = grow_box.png; path = theme/grow_box.png; sourceTree = "<group>"; }; + E4A3EB380F4EFF4D00596CC2 /* grow_box.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = grow_box.png; sourceTree = "<group>"; }; E4BD520E0F53596600591DFA /* new_tab_ui.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = new_tab_ui.cc; path = dom_ui/new_tab_ui.cc; sourceTree = "<group>"; }; E4BD520F0F53596600591DFA /* new_tab_ui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = new_tab_ui.h; path = dom_ui/new_tab_ui.h; sourceTree = "<group>"; }; E4BD55120F55AB3700591DFA /* text_elider.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = text_elider.cc; sourceTree = "<group>"; }; @@ -2919,6 +2920,7 @@ E4BD55480F55AE6900591DFA /* chrome_font_mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = chrome_font_mac.mm; sourceTree = "<group>"; }; E4BD55C80F55BBC500591DFA /* chrome_font_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = chrome_font_unittest.cc; sourceTree = "<group>"; }; E4BD56570F55C96B00591DFA /* text_elider_unittest.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = text_elider_unittest.cc; sourceTree = "<group>"; }; + E4BD5A4D0F58734C00591DFA /* stop.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = stop.pdf; sourceTree = "<group>"; }; E4DCDB9C0F4091BF0084059A /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; }; E4DCDC8E0F4091F30084059A /* libWebKitSystemInterfaceLeopard.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libWebKitSystemInterfaceLeopard.a; path = ../third_party/WebKit/WebKitLibraries/libWebKitSystemInterfaceLeopard.a; sourceTree = SOURCE_ROOT; }; E4F324400EE5CE94002533CE /* extension.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = extension.cc; sourceTree = "<group>"; }; @@ -4629,8 +4631,9 @@ 824FC14E0F44C56A000299E5 /* sadtab.png */, E46C504F0F291C0600B393B8 /* star.pdf */, E43D096D0F44C7BA003F39CA /* starred.pdf */, + E4BD5A4D0F58734C00591DFA /* stop.pdf */, ); - name = theme; + path = theme; sourceTree = "<group>"; }; E46C50D10F292E9B00B393B8 /* cocoa */ = { @@ -5462,6 +5465,7 @@ E43A7A0B0F1D192000ABD5D1 /* southWestResizeCursor.png in Resources */, E46C50500F291C0600B393B8 /* star.pdf in Resources */, E43D096E0F44C7BA003F39CA /* starred.pdf in Resources */, + E4BD5A4E0F58734C00591DFA /* stop.pdf in Resources */, E46C50EF0F2A12DC00B393B8 /* TabContents.xib in Resources */, E43A7A0C0F1D192000ABD5D1 /* textAreaResizeCorner.png in Resources */, E43A7A0D0F1D192000ABD5D1 /* verticalTextCursor.png in Resources */, diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 9aeda0f..aee4fbf 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -318,8 +318,27 @@ void TabContents::OpenURL(const GURL& url, const GURL& referrer, void TabContents::SetIsLoading(bool is_loading, LoadNotificationDetails* details) { - // TODO(port): this is a subset of SetIsLoading() as a stub + if (is_loading == is_loading_) + return; + is_loading_ = is_loading; + waiting_for_response_ = is_loading; + + // Suppress notifications for this TabContents if we are not active. + if (!is_active_) + return; + + if (delegate_) + delegate_->LoadingStateChanged(this); + + NotificationType type = is_loading ? NotificationType::LOAD_START : + NotificationType::LOAD_STOP; + NotificationDetails det = NotificationService::NoDetails();; + if (details) + det = Details<LoadNotificationDetails>(details); + NotificationService::current()->Notify(type, + Source<NavigationController>(this->controller()), + det); } bool TabContents::SupportsURL(GURL* url) { diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index 975ded3..1c84127 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -424,7 +424,7 @@ class TabContents : public PageNavigator, public NotificationObserver { }; TabContents(TabContentsType type) : type_(type), is_crashed_(false), is_active_(true), is_loading_(false), - is_being_destroyed_(false), controller_(), + is_being_destroyed_(false), waiting_for_response_(false), controller_(), delegate_(), max_page_id_(-1) { } virtual ~TabContents() { } NavigationController* controller() const { return controller_; } @@ -470,6 +470,7 @@ class TabContents : public PageNavigator, public NotificationObserver { void set_is_active(bool active) { is_active_ = active; } bool is_loading() const { return is_loading_; } bool is_being_destroyed() const { return is_being_destroyed_; } + bool waiting_for_response() const { return waiting_for_response_; } void SetNotWaitingForResponse() { NOTIMPLEMENTED(); } void NotifyNavigationStateChanged(unsigned int); TabContentsDelegate* delegate() const { return delegate_; } @@ -513,6 +514,7 @@ class TabContents : public PageNavigator, public NotificationObserver { bool is_active_; bool is_loading_; bool is_being_destroyed_; + bool waiting_for_response_; GURL url_; std::wstring title_; NavigationController* controller_; |