| 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 #include "chrome/browser/ui/views/constrained_window_views.h" | 5 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
| 12 #include "chrome/browser/platform_util.h" | 12 #include "chrome/browser/platform_util.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/themes/theme_properties.h" | 14 #include "chrome/browser/themes/theme_properties.h" |
| 15 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 15 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 16 #include "chrome/browser/ui/views/frame/browser_view.h" | 16 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 17 #include "chrome/browser/ui/views/theme_image_mapper.h" | 17 #include "chrome/browser/ui/views/theme_image_mapper.h" |
| 18 #include "chrome/browser/ui/web_contents_modal_dialog_host.h" | |
| 19 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | |
| 20 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
| 19 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| 20 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 21 #include "content/public/browser/navigation_controller.h" | 21 #include "content/public/browser/navigation_controller.h" |
| 22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 23 #include "content/public/browser/web_contents_view.h" | 23 #include "content/public/browser/web_contents_view.h" |
| 24 #include "grit/chromium_strings.h" | 24 #include "grit/chromium_strings.h" |
| 25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
| 26 #include "grit/theme_resources.h" | 26 #include "grit/theme_resources.h" |
| 27 #include "grit/ui_resources.h" | 27 #include "grit/ui_resources.h" |
| 28 #include "net/base/net_util.h" | 28 #include "net/base/net_util.h" |
| 29 #include "ui/aura/client/aura_constants.h" | 29 #include "ui/aura/client/aura_constants.h" |
| 30 #include "ui/base/hit_test.h" | 30 #include "ui/base/hit_test.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "ui/views/corewm/window_modality_controller.h" | 63 #include "ui/views/corewm/window_modality_controller.h" |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 #if defined(USE_ASH) | 66 #if defined(USE_ASH) |
| 67 #include "ash/ash_constants.h" | 67 #include "ash/ash_constants.h" |
| 68 #include "ash/shell.h" | 68 #include "ash/shell.h" |
| 69 #include "ash/wm/custom_frame_view_ash.h" | 69 #include "ash/wm/custom_frame_view_ash.h" |
| 70 #endif | 70 #endif |
| 71 | 71 |
| 72 using base::TimeDelta; | 72 using base::TimeDelta; |
| 73 using web_modal::WebContentsModalDialogHost; |
| 74 using web_modal::WebContentsModalDialogHostObserver; |
| 73 | 75 |
| 74 namespace views { | 76 namespace views { |
| 75 class ClientView; | 77 class ClientView; |
| 76 } | 78 } |
| 77 | 79 |
| 78 namespace { | 80 namespace { |
| 79 // The name of a key to store on the window handle to associate | 81 // The name of a key to store on the window handle to associate |
| 80 // WebContentsModalDialogHostObserverViews with the Widget. | 82 // WebContentsModalDialogHostObserverViews with the Widget. |
| 81 const char* const kWebContentsModalDialogHostObserverViewsKey = | 83 const char* const kWebContentsModalDialogHostObserverViewsKey = |
| 82 "__WEB_CONTENTS_MODAL_DIALOG_HOST_OBSERVER_VIEWS__"; | 84 "__WEB_CONTENTS_MODAL_DIALOG_HOST_OBSERVER_VIEWS__"; |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 force_opaque_border); | 693 force_opaque_border); |
| 692 } | 694 } |
| 693 #if defined(USE_ASH) | 695 #if defined(USE_ASH) |
| 694 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh; | 696 ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh; |
| 695 frame->Init(widget); | 697 frame->Init(widget); |
| 696 return frame; | 698 return frame; |
| 697 #endif | 699 #endif |
| 698 return new ConstrainedWindowFrameView(widget, | 700 return new ConstrainedWindowFrameView(widget, |
| 699 browser_context->IsOffTheRecord()); | 701 browser_context->IsOffTheRecord()); |
| 700 } | 702 } |
| OLD | NEW |