OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "base/mac/mac_util.h" | 5 #include "base/mac/mac_util.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 8 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
9 #import "chrome/browser/ui/cocoa/info_bubble_window.h" | 9 #import "chrome/browser/ui/cocoa/info_bubble_window.h" |
10 #import "chrome/browser/ui/cocoa/validation_message_bubble_controller.h" | 10 #import "chrome/browser/ui/cocoa/validation_message_bubble_controller.h" |
11 #include "chrome/browser/ui/validation_message_bubble.h" | 11 #include "chrome/browser/ui/validation_message_bubble.h" |
12 #include "content/public/browser/render_widget_host.h" | 12 #include "content/public/browser/render_widget_host.h" |
13 #include "content/public/browser/render_widget_host_view.h" | 13 #include "content/public/browser/render_widget_host_view.h" |
14 #include "grit/theme_resources.h" | 14 #include "grit/theme_resources.h" |
15 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 15 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
16 #import "ui/base/cocoa/base_view.h" | 16 #import "ui/base/cocoa/base_view.h" |
17 #import "ui/base/cocoa/flipped_view.h" | 17 #import "ui/base/cocoa/flipped_view.h" |
18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
19 | 19 |
20 const CGFloat kWindowInitialWidth = 200; | 20 const CGFloat kWindowInitialWidth = 200; |
21 const CGFloat kWindowInitialHeight = 100; | 21 const CGFloat kWindowInitialHeight = 100; |
22 const CGFloat kWindowMinWidth = 64; | 22 const CGFloat kWindowMinWidth = 64; |
23 const CGFloat kWindowMaxWidth = 256; | 23 const CGFloat kWindowMaxWidth = 256; |
24 const CGFloat kWindowPadding = 8; | 24 const CGFloat kWindowPadding = 8; |
25 const CGFloat kIconTextMargin = 4; | 25 const CGFloat kIconTextMargin = 4; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 scoped_ptr<ValidationMessageBubble> ValidationMessageBubble::CreateAndShow( | 186 scoped_ptr<ValidationMessageBubble> ValidationMessageBubble::CreateAndShow( |
187 content::RenderWidgetHost* widget_host, | 187 content::RenderWidgetHost* widget_host, |
188 const gfx::Rect& anchor_in_root_view, | 188 const gfx::Rect& anchor_in_root_view, |
189 const base::string16& main_text, | 189 const base::string16& main_text, |
190 const base::string16& sub_text) { | 190 const base::string16& sub_text) { |
191 return scoped_ptr<ValidationMessageBubble>(new ValidationMessageBubbleCocoa( | 191 return scoped_ptr<ValidationMessageBubble>(new ValidationMessageBubbleCocoa( |
192 widget_host, anchor_in_root_view, main_text, sub_text)).Pass(); | 192 widget_host, anchor_in_root_view, main_text, sub_text)).Pass(); |
193 } | 193 } |
194 | 194 |
195 } | 195 } |
OLD | NEW |