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

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

Issue 10703131: Move Instant stuff off Browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/profiles/profile_info_cache.h" 22 #include "chrome/browser/profiles/profile_info_cache.h"
23 #include "chrome/browser/profiles/profile_manager.h" 23 #include "chrome/browser/profiles/profile_manager.h"
24 #include "chrome/browser/sync/profile_sync_service.h" 24 #include "chrome/browser/sync/profile_sync_service.h"
25 #include "chrome/browser/sync/sync_ui_util_mac.h" 25 #include "chrome/browser/sync/sync_ui_util_mac.h"
26 #include "chrome/browser/themes/theme_service.h" 26 #include "chrome/browser/themes/theme_service.h"
27 #include "chrome/browser/themes/theme_service_factory.h" 27 #include "chrome/browser/themes/theme_service_factory.h"
28 #include "chrome/browser/ui/browser.h" 28 #include "chrome/browser/ui/browser.h"
29 #include "chrome/browser/ui/browser_command_controller.h" 29 #include "chrome/browser/ui/browser_command_controller.h"
30 #include "chrome/browser/ui/browser_commands.h" 30 #include "chrome/browser/ui/browser_commands.h"
31 #include "chrome/browser/ui/browser_instant_controller.h"
31 #include "chrome/browser/ui/browser_list.h" 32 #include "chrome/browser/ui/browser_list.h"
32 #include "chrome/browser/ui/browser_tabstrip.h" 33 #include "chrome/browser/ui/browser_tabstrip.h"
33 #include "chrome/browser/ui/browser_window_state.h" 34 #include "chrome/browser/ui/browser_window_state.h"
34 #import "chrome/browser/ui/cocoa/background_gradient_view.h" 35 #import "chrome/browser/ui/cocoa/background_gradient_view.h"
35 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 36 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
36 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h" 37 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h"
37 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h" 38 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h"
38 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" 39 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
39 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" 40 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
40 #import "chrome/browser/ui/cocoa/browser_window_utils.h" 41 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1908 // TODO(rohitrao): Revisit whether or not this method should be called when 1909 // TODO(rohitrao): Revisit whether or not this method should be called when
1909 // instant isn't showing. 1910 // instant isn't showing.
1910 if (![previewableContentsController_ isShowingPreview]) 1911 if (![previewableContentsController_ isShowingPreview])
1911 return; 1912 return;
1912 1913
1913 [previewableContentsController_ hidePreview]; 1914 [previewableContentsController_ hidePreview];
1914 [self updateBookmarkBarVisibilityWithAnimation:NO]; 1915 [self updateBookmarkBarVisibilityWithAnimation:NO];
1915 } 1916 }
1916 1917
1917 - (void)commitInstant { 1918 - (void)commitInstant {
1918 InstantController* instant = browser_->instant(); 1919 InstantController* instant = browser_->instant_controller()->instant();
1919 if (instant) 1920 if (instant)
1920 instant->CommitIfCurrent(); 1921 instant->CommitIfCurrent();
1921 } 1922 }
1922 1923
1923 1924
1924 - (NSRect)instantFrame { 1925 - (NSRect)instantFrame {
1925 // The view's bounds are in its own coordinate system. Convert that to the 1926 // The view's bounds are in its own coordinate system. Convert that to the
1926 // window base coordinate system, then translate it into the screen's 1927 // window base coordinate system, then translate it into the screen's
1927 // coordinate system. 1928 // coordinate system.
1928 NSView* view = [previewableContentsController_ view]; 1929 NSView* view = [previewableContentsController_ view];
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 2218
2218 - (BOOL)supportsBookmarkBar { 2219 - (BOOL)supportsBookmarkBar {
2219 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2220 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2220 } 2221 }
2221 2222
2222 - (BOOL)isTabbedWindow { 2223 - (BOOL)isTabbedWindow {
2223 return browser_->is_type_tabbed(); 2224 return browser_->is_type_tabbed();
2224 } 2225 }
2225 2226
2226 @end // @implementation BrowserWindowController(WindowType) 2227 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698