OLD | NEW |
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/tabs/tab_strip_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
6 | 6 |
7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <limits> | 10 #include <limits> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "chrome/common/pref_names.h" | 51 #include "chrome/common/pref_names.h" |
52 #include "components/metrics/proto/omnibox_event.pb.h" | 52 #include "components/metrics/proto/omnibox_event.pb.h" |
53 #include "components/omnibox/autocomplete_match.h" | 53 #include "components/omnibox/autocomplete_match.h" |
54 #include "components/url_fixer/url_fixer.h" | 54 #include "components/url_fixer/url_fixer.h" |
55 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 55 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
56 #include "content/public/browser/navigation_controller.h" | 56 #include "content/public/browser/navigation_controller.h" |
57 #include "content/public/browser/user_metrics.h" | 57 #include "content/public/browser/user_metrics.h" |
58 #include "content/public/browser/web_contents.h" | 58 #include "content/public/browser/web_contents.h" |
59 #include "grit/generated_resources.h" | 59 #include "grit/generated_resources.h" |
60 #include "grit/theme_resources.h" | 60 #include "grit/theme_resources.h" |
61 #include "grit/ui_resources.h" | |
62 #include "skia/ext/skia_utils_mac.h" | 61 #include "skia/ext/skia_utils_mac.h" |
63 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h
" | 62 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h
" |
64 #include "ui/base/cocoa/animation_utils.h" | 63 #include "ui/base/cocoa/animation_utils.h" |
65 #import "ui/base/cocoa/tracking_area.h" | 64 #import "ui/base/cocoa/tracking_area.h" |
66 #include "ui/base/l10n/l10n_util.h" | 65 #include "ui/base/l10n/l10n_util.h" |
67 #include "ui/base/models/list_selection_model.h" | 66 #include "ui/base/models/list_selection_model.h" |
68 #include "ui/base/resource/resource_bundle.h" | 67 #include "ui/base/resource/resource_bundle.h" |
69 #include "ui/base/theme_provider.h" | 68 #include "ui/base/theme_provider.h" |
70 #include "ui/gfx/image/image.h" | 69 #include "ui/gfx/image/image.h" |
71 #include "ui/gfx/mac/scoped_ns_disable_screen_updates.h" | 70 #include "ui/gfx/mac/scoped_ns_disable_screen_updates.h" |
| 71 #include "ui/resources/grit/ui_resources.h" |
72 | 72 |
73 using base::UserMetricsAction; | 73 using base::UserMetricsAction; |
74 using content::OpenURLParams; | 74 using content::OpenURLParams; |
75 using content::Referrer; | 75 using content::Referrer; |
76 using content::WebContents; | 76 using content::WebContents; |
77 | 77 |
78 namespace { | 78 namespace { |
79 | 79 |
80 // A value to indicate tab layout should use the full available width of the | 80 // A value to indicate tab layout should use the full available width of the |
81 // view. | 81 // view. |
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2229 } | 2229 } |
2230 | 2230 |
2231 NSRect GetSheetParentBoundsForParentView(NSView* view) { | 2231 NSRect GetSheetParentBoundsForParentView(NSView* view) { |
2232 // If the devtools view is open, it shrinks the size of the WebContents, so go | 2232 // If the devtools view is open, it shrinks the size of the WebContents, so go |
2233 // up the hierarchy to the devtools container view to avoid that. Note that | 2233 // up the hierarchy to the devtools container view to avoid that. Note that |
2234 // the devtools view is always in the hierarchy even if it is not open or it | 2234 // the devtools view is always in the hierarchy even if it is not open or it |
2235 // is detached. | 2235 // is detached. |
2236 NSView* devtools_view = [[[view superview] superview] superview]; | 2236 NSView* devtools_view = [[[view superview] superview] superview]; |
2237 return [devtools_view convertRect:[devtools_view bounds] toView:nil]; | 2237 return [devtools_view convertRect:[devtools_view bounds] toView:nil]; |
2238 } | 2238 } |
OLD | NEW |