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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 // Handle the openLearnMoreAboutCrashLink: action from SadTabController when 1909 // Handle the openLearnMoreAboutCrashLink: action from SadTabController when
1910 // "Learn more" link in "Aw snap" page (i.e. crash page or sad tab) is 1910 // "Learn more" link in "Aw snap" page (i.e. crash page or sad tab) is
1911 // clicked. Decoupling the action from its target makes unit testing possible. 1911 // clicked. Decoupling the action from its target makes unit testing possible.
1912 - (void)openLearnMoreAboutCrashLink:(id)sender { 1912 - (void)openLearnMoreAboutCrashLink:(id)sender {
1913 if (SadTabController* sadTab = 1913 if (SadTabController* sadTab =
1914 base::mac::ObjCCast<SadTabController>(sender)) { 1914 base::mac::ObjCCast<SadTabController>(sender)) {
1915 WebContents* webContents = [sadTab webContents]; 1915 WebContents* webContents = [sadTab webContents];
1916 if (webContents) { 1916 if (webContents) {
1917 OpenURLParams params( 1917 OpenURLParams params(
1918 GURL(chrome::kCrashReasonURL), Referrer(), CURRENT_TAB, 1918 GURL(chrome::kCrashReasonURL), Referrer(), CURRENT_TAB,
1919 content::PAGE_TRANSITION_LINK, false); 1919 ui::PAGE_TRANSITION_LINK, false);
1920 webContents->OpenURL(params); 1920 webContents->OpenURL(params);
1921 } 1921 }
1922 } 1922 }
1923 } 1923 }
1924 1924
1925 // Delegate method called when window did move. (See below for why we don't use 1925 // Delegate method called when window did move. (See below for why we don't use
1926 // |-windowWillMove:|, which is called less frequently than |-windowDidMove| 1926 // |-windowWillMove:|, which is called less frequently than |-windowDidMove|
1927 // instead.) 1927 // instead.)
1928 - (void)windowDidMove:(NSNotification*)notification { 1928 - (void)windowDidMove:(NSNotification*)notification {
1929 [self saveWindowPositionIfNeeded]; 1929 [self saveWindowPositionIfNeeded];
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 2229
2230 - (BOOL)supportsBookmarkBar { 2230 - (BOOL)supportsBookmarkBar {
2231 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2231 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2232 } 2232 }
2233 2233
2234 - (BOOL)isTabbedWindow { 2234 - (BOOL)isTabbedWindow {
2235 return browser_->is_type_tabbed(); 2235 return browser_->is_type_tabbed();
2236 } 2236 }
2237 2237
2238 @end // @implementation BrowserWindowController(WindowType) 2238 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698