| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include "app/message_box_flags.h" | 7 #include "app/message_box_flags.h" |
| 8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "chrome/browser/automation/ui_controls.h" | 52 #include "chrome/browser/automation/ui_controls.h" |
| 53 #include "chrome/browser/character_encoding.h" | 53 #include "chrome/browser/character_encoding.h" |
| 54 #include "chrome/browser/download/save_package.h" | 54 #include "chrome/browser/download/save_package.h" |
| 55 #include "chrome/browser/external_tab_container.h" | 55 #include "chrome/browser/external_tab_container.h" |
| 56 #include "chrome/browser/login_prompt.h" | 56 #include "chrome/browser/login_prompt.h" |
| 57 #include "chrome/browser/printing/print_job.h" | 57 #include "chrome/browser/printing/print_job.h" |
| 58 #endif // defined(OS_WIN) | 58 #endif // defined(OS_WIN) |
| 59 | 59 |
| 60 #if defined(OS_WIN) | 60 #if defined(OS_WIN) |
| 61 #include "chrome/browser/views/bookmark_bar_view.h" | 61 #include "chrome/browser/views/bookmark_bar_view.h" |
| 62 #include "views/widget/root_view.h" |
| 62 #include "views/widget/widget_win.h" | 63 #include "views/widget/widget_win.h" |
| 63 #include "views/window/window.h" | 64 #include "views/window/window.h" |
| 64 #endif | 65 #endif |
| 65 | 66 |
| 66 using base::Time; | 67 using base::Time; |
| 67 | 68 |
| 68 class InitialLoadObserver : public NotificationObserver { | 69 class InitialLoadObserver : public NotificationObserver { |
| 69 public: | 70 public: |
| 70 InitialLoadObserver(size_t tab_count, AutomationProvider* automation) | 71 InitialLoadObserver(size_t tab_count, AutomationProvider* automation) |
| 71 : automation_(automation), | 72 : automation_(automation), |
| (...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2421 *tab_handle = 0; | 2422 *tab_handle = 0; |
| 2422 *tab_container_window = NULL; | 2423 *tab_container_window = NULL; |
| 2423 ExternalTabContainer *external_tab_container = | 2424 ExternalTabContainer *external_tab_container = |
| 2424 new ExternalTabContainer(this); | 2425 new ExternalTabContainer(this); |
| 2425 Profile* profile = incognito? profile_->GetOffTheRecordProfile() : profile_; | 2426 Profile* profile = incognito? profile_->GetOffTheRecordProfile() : profile_; |
| 2426 external_tab_container->Init(profile, parent, dimensions, style); | 2427 external_tab_container->Init(profile, parent, dimensions, style); |
| 2427 TabContents* tab_contents = external_tab_container->tab_contents(); | 2428 TabContents* tab_contents = external_tab_container->tab_contents(); |
| 2428 if (tab_contents) { | 2429 if (tab_contents) { |
| 2429 *tab_handle = tab_tracker_->Add(&tab_contents->controller()); | 2430 *tab_handle = tab_tracker_->Add(&tab_contents->controller()); |
| 2430 external_tab_container->set_tab_handle(*tab_handle); | 2431 external_tab_container->set_tab_handle(*tab_handle); |
| 2431 *tab_container_window = *external_tab_container; | 2432 *tab_container_window = external_tab_container->GetNativeView(); |
| 2432 } else { | 2433 } else { |
| 2433 delete external_tab_container; | 2434 delete external_tab_container; |
| 2434 } | 2435 } |
| 2435 } | 2436 } |
| 2436 #endif | 2437 #endif |
| 2437 | 2438 |
| 2438 void AutomationProvider::NavigateInExternalTab( | 2439 void AutomationProvider::NavigateInExternalTab( |
| 2439 int handle, const GURL& url, | 2440 int handle, const GURL& url, |
| 2440 AutomationMsg_NavigationResponseValues* status) { | 2441 AutomationMsg_NavigationResponseValues* status) { |
| 2441 *status = AUTOMATION_MSG_NAVIGATION_ERROR; | 2442 *status = AUTOMATION_MSG_NAVIGATION_ERROR; |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2976 DLOG(WARNING) << "SetParent failed. Error 0x%x" << GetLastError(); | 2977 DLOG(WARNING) << "SetParent failed. Error 0x%x" << GetLastError(); |
| 2977 } | 2978 } |
| 2978 } | 2979 } |
| 2979 } | 2980 } |
| 2980 #endif | 2981 #endif |
| 2981 | 2982 |
| 2982 void AutomationProvider::GetWindowTitle(int handle, string16* text) { | 2983 void AutomationProvider::GetWindowTitle(int handle, string16* text) { |
| 2983 gfx::NativeWindow window = window_tracker_->GetResource(handle); | 2984 gfx::NativeWindow window = window_tracker_->GetResource(handle); |
| 2984 text->assign(platform_util::GetWindowTitle(window)); | 2985 text->assign(platform_util::GetWindowTitle(window)); |
| 2985 } | 2986 } |
| OLD | NEW |