diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 14:26:54 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 14:26:54 +0000 |
commit | 7d926f9072ac496db6df715cc6a6bd5d3f9bd011 (patch) | |
tree | 5a098ba124a7d9749d43617e703d62ce9f271171 /chrome/browser | |
parent | ebd49b19aafad701860adf8e1e145448ef8d13e5 (diff) | |
download | chromium_src-7d926f9072ac496db6df715cc6a6bd5d3f9bd011.zip chromium_src-7d926f9072ac496db6df715cc6a6bd5d3f9bd011.tar.gz chromium_src-7d926f9072ac496db6df715cc6a6bd5d3f9bd011.tar.bz2 |
Remove some instances of NOTIMPLEMENTED in favor of hooking up functionality or filing a bug as a placeholder. Reduces noise at startup.
Review URL: http://codereview.chromium.org/27353
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa.mm | 4 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_controller.h | 6 | ||||
-rw-r--r-- | chrome/browser/cocoa/browser_window_controller.mm | 17 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.h | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.h | 3 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_strip_controller.mm | 7 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_mac.mm | 11 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents.cc | 8 |
8 files changed, 47 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/browser_window_cocoa.mm b/chrome/browser/cocoa/browser_window_cocoa.mm index aca8d78..9d1ae21 100644 --- a/chrome/browser/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/cocoa/browser_window_cocoa.mm @@ -74,7 +74,7 @@ void BrowserWindowCocoa::UpdateTitleBar() { } void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) { - NOTIMPLEMENTED(); + [controller_ updateLoadingAnimations:should_animate ? YES : NO]; } void BrowserWindowCocoa::SetStarredState(bool is_starred) { @@ -114,7 +114,7 @@ LocationBar* BrowserWindowCocoa::GetLocationBar() const { } void BrowserWindowCocoa::SetFocusToLocationBar() { - NOTIMPLEMENTED(); + [controller_ focusLocationBar]; } void BrowserWindowCocoa::UpdateStopGoState(bool is_loading) { diff --git a/chrome/browser/cocoa/browser_window_controller.h b/chrome/browser/cocoa/browser_window_controller.h index e333758..eaf03a1 100644 --- a/chrome/browser/cocoa/browser_window_controller.h +++ b/chrome/browser/cocoa/browser_window_controller.h @@ -64,6 +64,12 @@ class TabContents; // Called to tell the selected tab to update its loading state. - (void)setIsLoading:(BOOL)isLoading; +// Called to start/stop the loading animations. +- (void)updateLoadingAnimations:(BOOL)animate; + +// Make the location bar the first responder, if possible. +- (void)focusLocationBar; + @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 76219e2..3365812 100644 --- a/chrome/browser/cocoa/browser_window_controller.mm +++ b/chrome/browser/cocoa/browser_window_controller.mm @@ -158,4 +158,21 @@ [tabStripController_ setIsLoading:isLoading]; } +// Called to start/stop the loading animations. +- (void)updateLoadingAnimations:(BOOL)animate { + if (animate) { + // TODO(pinkerton): determine what throbber animation is necessary and + // start a timer to periodically update. Windows tells the tab strip to + // do this. It uses a single timer to coalesce the multiple things that + // could be updating. http://crbug.com/8281 + } else { + // TODO(pinkerton): stop the timer. + } +} + +// Make the location bar the first responder, if possible. +- (void)focusLocationBar { + [tabStripController_ focusLocationBar]; +} + @end diff --git a/chrome/browser/cocoa/tab_contents_controller.h b/chrome/browser/cocoa/tab_contents_controller.h index de58708..2bf021a 100644 --- a/chrome/browser/cocoa/tab_contents_controller.h +++ b/chrome/browser/cocoa/tab_contents_controller.h @@ -83,6 +83,9 @@ class ToolbarModel; // state. - (void)setIsLoading:(BOOL)isLoading; +// Make the location bar the first responder, if possible. +- (void)focusLocationBar; + @end #endif // CHROME_BROWSER_COCOA_TAB_COTNENTS_CONTROLLER_H_ diff --git a/chrome/browser/cocoa/tab_strip_controller.h b/chrome/browser/cocoa/tab_strip_controller.h index 968b9ec..8a41c08 100644 --- a/chrome/browser/cocoa/tab_strip_controller.h +++ b/chrome/browser/cocoa/tab_strip_controller.h @@ -69,6 +69,9 @@ class ToolbarModel; // Called to tell the selected tab to update its loading state. - (void)setIsLoading:(BOOL)isLoading; +// Make the location bar the first responder, if possible. +- (void)focusLocationBar; + @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 98abf86..1dbe57f 100644 --- a/chrome/browser/cocoa/tab_strip_controller.mm +++ b/chrome/browser/cocoa/tab_strip_controller.mm @@ -353,6 +353,13 @@ class TabStripBridge : public TabStripModelObserver { [selectedController setIsLoading:isLoading]; } +// Make the location bar the first responder, if possible. +- (void)focusLocationBar { + TabContentsController* selectedController = + [tabControllerArray_ objectAtIndex:tabModel_->selected_index()]; + [selectedController focusLocationBar]; +} + @end //-------------------------------------------------------------------------- diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index b644b7a..e8d9c25 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -80,11 +80,18 @@ void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) { if (is_hidden_) return; - NOTIMPLEMENTED(); // Who is trying to force a size? We're a Cocoa view. + // TODO(avi): the WebContents object uses this method to size the newly + // created widget to the correct size. At the time of this call, we're not yet + // in the view hierarchy so |size| ends up being 0x0. However, this works for + // us because we're using the Cocoa view struture and resizer flags to fix + // things up as soon as the view gets added to the hierarchy. Figure out if we + // want to keep this flow or switch back to the flow Windows uses which sets + // the size upon creation. http://crbug.com/8285. } gfx::NativeView RenderWidgetHostViewMac::GetPluginNativeView() { - NOTIMPLEMENTED(); + // All plugin stuff is TBD. TODO(avi,awalker): fill in + // http://crbug.com/8192 return nil; } diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc index 449a51e..1337b51 100644 --- a/chrome/browser/tab_contents/web_contents.cc +++ b/chrome/browser/tab_contents/web_contents.cc @@ -1219,7 +1219,6 @@ GURL WebContents::GetAlternateErrorPageURL() const { WebPreferences WebContents::GetWebkitPrefs() { // Initialize web_preferences_ to chrome defaults. WebPreferences web_prefs; -#if defined(OS_WIN) || defined(OS_LINUX) PrefService* prefs = profile()->GetPrefs(); web_prefs.fixed_font_family = @@ -1296,13 +1295,6 @@ WebPreferences WebContents::GetWebkitPrefs() { web_prefs.default_encoding = prefs->GetString( prefs::kDefaultCharset); } -#else - // TODO(port): we skip doing the above settings because the default values - // for these prefs->GetFoo() calls aren't filled in yet. By leaving the - // the WebPreferences alone, we get the moderately-sane default values out - // of WebKit. Remove this ifdef block once we properly load font sizes, etc. - NOTIMPLEMENTED(); -#endif DCHECK(!web_prefs.default_encoding.empty()); return web_prefs; |