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

Side by Side Diff: chrome/browser/automation/automation_provider_win.cc

Issue 1205001: Revert 42366 - Allow TabContentsDelegate classes to specify whether InfoBars ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/external_tab_container.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/keyboard_codes.h" 7 #include "base/keyboard_codes.h"
8 #include "chrome/browser/automation/ui_controls.h" 8 #include "chrome/browser/automation/ui_controls.h"
9 #include "chrome/browser/browser_window.h" 9 #include "chrome/browser/browser_window.h"
10 #include "chrome/browser/external_tab_container.h" 10 #include "chrome/browser/external_tab_container.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 new ExternalTabContainer(this, automation_resource_message_filter_); 318 new ExternalTabContainer(this, automation_resource_message_filter_);
319 319
320 Profile* profile = settings.is_off_the_record ? 320 Profile* profile = settings.is_off_the_record ?
321 profile_->GetOffTheRecordProfile() : profile_; 321 profile_->GetOffTheRecordProfile() : profile_;
322 322
323 // When the ExternalTabContainer window is created we grab a reference on it 323 // When the ExternalTabContainer window is created we grab a reference on it
324 // which is released when the window is destroyed. 324 // which is released when the window is destroyed.
325 external_tab_container->Init(profile, settings.parent, settings.dimensions, 325 external_tab_container->Init(profile, settings.parent, settings.dimensions,
326 settings.style, settings.load_requests_via_automation, 326 settings.style, settings.load_requests_via_automation,
327 settings.handle_top_level_requests, NULL, settings.initial_url, 327 settings.handle_top_level_requests, NULL, settings.initial_url,
328 settings.referrer, settings.infobars_enabled); 328 settings.referrer);
329 329
330 if (AddExternalTab(external_tab_container)) { 330 if (AddExternalTab(external_tab_container)) {
331 TabContents* tab_contents = external_tab_container->tab_contents(); 331 TabContents* tab_contents = external_tab_container->tab_contents();
332 *tab_handle = external_tab_container->tab_handle(); 332 *tab_handle = external_tab_container->tab_handle();
333 *tab_container_window = external_tab_container->GetNativeView(); 333 *tab_container_window = external_tab_container->GetNativeView();
334 *tab_window = tab_contents->GetNativeView(); 334 *tab_window = tab_contents->GetNativeView();
335 } else { 335 } else {
336 external_tab_container->Uninitialize(); 336 external_tab_container->Uninitialize();
337 } 337 }
338 } 338 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 } 499 }
500 } 500 }
501 501
502 void AutomationProvider::GetWindowTitle(int handle, string16* text) { 502 void AutomationProvider::GetWindowTitle(int handle, string16* text) {
503 gfx::NativeWindow window = window_tracker_->GetResource(handle); 503 gfx::NativeWindow window = window_tracker_->GetResource(handle);
504 std::wstring result; 504 std::wstring result;
505 int length = ::GetWindowTextLength(window) + 1; 505 int length = ::GetWindowTextLength(window) + 1;
506 ::GetWindowText(window, WriteInto(&result, length), length); 506 ::GetWindowText(window, WriteInto(&result, length), length);
507 text->assign(WideToUTF16(result)); 507 text->assign(WideToUTF16(result));
508 } 508 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/external_tab_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698