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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 8760003: [ntp4] Remove bookmarks page implementation and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: update page_list_view.js Created 9 years 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 | Annotate | Revision Log
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 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #import "base/memory/scoped_nsobject.h" 10 #import "base/memory/scoped_nsobject.h"
(...skipping 12 matching lines...) Expand all
23 #import "chrome/browser/ui/cocoa/framed_browser_window.h" 23 #import "chrome/browser/ui/cocoa/framed_browser_window.h"
24 #import "chrome/browser/ui/cocoa/fullscreen_window.h" 24 #import "chrome/browser/ui/cocoa/fullscreen_window.h"
25 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" 25 #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h"
26 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" 26 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h"
27 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" 27 #import "chrome/browser/ui/cocoa/status_bubble_mac.h"
28 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h" 28 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h"
29 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 29 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
30 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" 30 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
31 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 31 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
32 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 32 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
33 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
34 #include "chrome/common/pref_names.h" 33 #include "chrome/common/pref_names.h"
35 #include "content/browser/renderer_host/render_widget_host_view.h" 34 #include "content/browser/renderer_host/render_widget_host_view.h"
36 #include "content/browser/tab_contents/tab_contents.h" 35 #include "content/browser/tab_contents/tab_contents.h"
37 #include "content/browser/tab_contents/tab_contents_view.h" 36 #include "content/browser/tab_contents/tab_contents_view.h"
38 #include "ui/base/ui_base_types.h" 37 #include "ui/base/ui_base_types.h"
39 38
40 // Forward-declare symbols that are part of the 10.6 SDK. 39 // Forward-declare symbols that are part of the 10.6 SDK.
41 #if !defined(MAC_OS_X_VERSION_10_6) || \ 40 #if !defined(MAC_OS_X_VERSION_10_6) || \
42 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 41 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
43 42
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 } 525 }
527 } 526 }
528 527
529 - (BOOL)shouldShowBookmarkBar { 528 - (BOOL)shouldShowBookmarkBar {
530 DCHECK(browser_.get()); 529 DCHECK(browser_.get());
531 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ? 530 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ?
532 YES : NO; 531 YES : NO;
533 } 532 }
534 533
535 - (BOOL)shouldShowDetachedBookmarkBar { 534 - (BOOL)shouldShowDetachedBookmarkBar {
536 // Don't show detatched bookmarks when NTP4 bookmark features exist.
537 if (NewTabUI::NTP4BookmarkFeaturesEnabled())
538 return NO;
539
540 DCHECK(browser_.get()); 535 DCHECK(browser_.get());
541 TabContentsWrapper* tab = browser_->GetSelectedTabContentsWrapper(); 536 TabContentsWrapper* tab = browser_->GetSelectedTabContentsWrapper();
542 return (tab && tab->bookmark_tab_helper()->ShouldShowBookmarkBar() && 537 return (tab && tab->bookmark_tab_helper()->ShouldShowBookmarkBar() &&
543 ![previewableContentsController_ isShowingPreview]); 538 ![previewableContentsController_ isShowingPreview]);
544 } 539 }
545 540
546 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression { 541 - (void)adjustToolbarAndBookmarkBarForCompression:(CGFloat)compression {
547 CGFloat newHeight = 542 CGFloat newHeight =
548 [toolbarController_ desiredHeightForCompression:compression]; 543 [toolbarController_ desiredHeightForCompression:compression];
549 NSRect toolbarFrame = [[toolbarController_ view] frame]; 544 NSRect toolbarFrame = [[toolbarController_ view] frame];
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 - (void)disableBarVisibilityUpdates { 897 - (void)disableBarVisibilityUpdates {
903 // Early escape if there's nothing to do. 898 // Early escape if there's nothing to do.
904 if (!barVisibilityUpdatesEnabled_) 899 if (!barVisibilityUpdatesEnabled_)
905 return; 900 return;
906 901
907 barVisibilityUpdatesEnabled_ = NO; 902 barVisibilityUpdatesEnabled_ = NO;
908 [presentationModeController_ cancelAnimationAndTimers]; 903 [presentationModeController_ cancelAnimationAndTimers];
909 } 904 }
910 905
911 @end // @implementation BrowserWindowController(Private) 906 @end // @implementation BrowserWindowController(Private)
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/page_list_view.js ('k') | chrome/browser/ui/webui/ntp/bookmarks_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698